Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a task to complete which involves building a series of libraries from source using configure; make; make install. The generated libraries and misc files are going to be put onto an embedded system compatible with the build environment.

My question is how do I know what files got installed and where so that I can grab them and move them to the embedded environment?

Is a log created by way of running make install? Or do I simply tee the output of make install to a file?

Suggestions, hints and tips would be greatly appreciated.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You can use make -n install to see what make install would do. Note that sometimes one of the commands it'll run is another make in a child directory; make -n isn't recursive.

If the software is using the standard gnu autoconf configure script, you should be able to

./configure --prefix=/my/directory/for/embedded/system [...]

and then everything will be installed under that prefix.

You can try copying it to the "standard" locations on the embedded system, but the software may or may not work correctly.

If nothing else, you can use this as a way to gather inventory on what the software installs.

Another trick - try modifying the Makefile to redefine the command that installs the files (often "install" or "install.sh"). Replace it with your own version that writes its action to a log file.

If you want a lighter-weight solution to help manage this (vs RPM or dpkg), take a look at GNU Stow.

share|improve this answer
    
What about disabling the rpath and using the prefix to install them to a non-standard location of the filesystem? Would that then allow me to install them into say /usr and still work even though they where build with a prefix of say /my/special/place? –  Chimera Jun 15 '13 at 0:25
    
might work, might not. The software may make assumptions about where it's located, or it may not. If nothing else, though, you can install to a different prefix, then see what's installed. That will help you inventory what gets installed. Another idea - look at the makefile and see what it uses to install files. Often it's a shell script install.sh or similar; you could modify the shell script to write each path to a text file when it installs it. –  Dan Pritts Jun 17 '13 at 20:26
    
I like the idea of first building and installing into a special prefix to get the inventory, then building and installing into the correct prefix... –  Chimera Jun 17 '13 at 21:52
    
If you add that idea to your answer I will likely accept it.. –  Chimera Jun 17 '13 at 21:53
    
there ya go. hope it works out for you. –  Dan Pritts Jun 18 '13 at 3:45
add comment

This is the #1 reason to use a packaging system, such as RPM (Red Hat) or deb (Debian).

For embedded Linux systems, the usual package management system is opkg, a successor to ipkg, which is loosely based on the deb format, and is usually easy to adapt from Debian package building instructions.

share|improve this answer
    
Yes, unfortunately I didn't create the Linux environment and it wasn't created with or from a packaging system. It surely would make things easier. –  Chimera Jun 16 '13 at 22:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.