[SOLVED] Getting a list of file install locations with make install?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Getting a list of file install locations with make install?
I have a bit of a problem and the only solution I can think of at the moment is a very tedious one, so I was hoping there would be a better way. What I am trying to do is cross compile the PPPD program so that I can install it on an embedded system (this system does not have make/gcc on it). It was easy to cross compile it, but I can not run "make install" since I'm compiling on a secondary machine. I don't want to install PPPD on this secondary machine (I couldn't anyway, because it was compiled for a different architecture) and I can't run make install on the target machine because there is no make/build system for it.
So it seems like what I would have to do is to manually copy over each compiled file from the build machine to the appropriate location of the target machine. And the only way (that I know of) to figure out how to do this is to manually examine the Makefiles (yes, there are several for PPPD) and figure out which file should go where on the target system. This isn't trivial because it uses a hierarchy of makefiles and the probability of human error for this method is high.
Is it possible that I could run another command that would give me a list of all the commands that make install would perform? Or a list of all files and their target location for "make install"? Or possibly some other solution that I am completely unaware of that would make this task not so painful and error prone?
I have a bit of a problem and the only solution I can think of at the moment is a very tedious one, so I was hoping there would be a better way. What I am trying to do is cross compile the PPPD program so that I can install it on an embedded system (this system does not have make/gcc on it). It was easy to cross compile it, but I can not run "make install" since I'm compiling on a secondary machine. I don't want to install PPPD on this secondary machine (I couldn't anyway, because it was compiled for a different architecture) and I can't run make install on the target machine because there is no make/build system for it.
So it seems like what I would have to do is to manually copy over each compiled file from the build machine to the appropriate location of the target machine. And the only way (that I know of) to figure out how to do this is to manually examine the Makefiles (yes, there are several for PPPD) and figure out which file should go where on the target system. This isn't trivial because it uses a hierarchy of makefiles and the probability of human error for this method is high.
Is it possible that I could run another command that would give me a list of all the commands that make install would perform? Or a list of all files and their target location for "make install"? Or possibly some other solution that I am completely unaware of that would make this task not so painful and error prone?
Export your embedded system filesystem through NFS - then you'll be able to install running 'make install'; you'll need to give 'configure'
Distribution: Debian, Ubuntu, CentOS; in days past Fedora, Solaris, SunOS, 4.2BSD, 4.3BSD, SVR4, AIX, HP-UX
Posts: 101
Rep:
According to the make man page:
Quote:
-n, --just-print, --dry-run, --recon
Print the commands that would be executed, but do not execute them.
Would that help?
What I mean is, run make install -n on the development machine to figure out what make install moves where, then reproduce that on the target machine manually or by some script.
Last edited by ordinary; 12-21-2010 at 02:56 PM.
Reason: typo
Ack, can't believe I failed to find that in the man page. FML RTFM Thanks everyone, all great solutions to my problem. I believe I can take care of this now.
Ack, can't believe I failed to find that in the man page. FML RTFM Thanks everyone, all great solutions to my problem. I believe I can take care of this now.
Since I'm building from source more than 300 targets, I know that 'make install' is not always just copying files, sometimes pretty sophisticated commands are run, including compilation and linking. So, as I suggested, you better run 'make install' for real.
An excerpt of 'make install' screen output for ImageMagick:
src2pkg might be the solution for you. It configures, compiles and builds packages from many different kinds of sources. It uses a forked version of installwatch(libsentry) to track file creation and modification. libsentry includes a utility which will simply list all files created or modified, if you prefer to handle packaging/copying yourself. It really shines for sources which don't support DESTDIR and handles python, perl, tcl, qmake, imake, jam, scons and lots of other weird config methods: http://distro.ibiblio.org/pub/linux/...nload/src2pkg/
./configure --prefix=/some/special/directory/that/exists
make
make install
Everything should be installed at the specified target directory, from where it can be copied/moved.
--- rod.
Well, your suggestion is essentially equivalent to mine; sometimes library paths are absolute, so on target system one will have to make symbolic links to resolve directory paths.
The OP can also export his/her development machine directories through NFS and import them in the embedded system. In such a case he/she has practically unlimited disk space and native compiler (residing in the exported NFS) can be used for everything, though it will be slower.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.