What files did `make install` copy, and where?

后端 未结 6 633
没有蜡笔的小新
没有蜡笔的小新 2021-01-04 10:09

Is there a way to get a list of filenames/paths that make install copies to the filesystem? Some packages come with a MANIFEST file, but not the ones that I am

6条回答
  •  爱一瞬间的悲伤
    2021-01-04 10:25

    1. Take a snapshot of the contents of the install location before installing
    2. Install
    3. Compare the current contents with the old contents.

    Example:

    ./configure --prefix /usr/local
    make -j`nproc`
    
    find /usr/local | sort -u > /tmp/snapshot1
    make install
    find /usr/local | sort -u > /tmp/snapshot2
    comm -3 /tmp/snapshot{1,2} # this prints the files added by `make install` to stdout
    

提交回复
热议问题