2

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.

Chimera
  • 51
  • 8

2 Answers2

1

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.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • 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
1

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.

Dan Pritts
  • 3,221
  • 26
  • 28
  • 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 00: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
  • there ya go. hope it works out for you. – Dan Pritts Jun 18 '13 at 03:45