help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make with another make as a prerequisite


From: crjjrc
Subject: Make with another make as a prerequisite
Date: 1 Mar 2007 08:45:59 -0800
User-agent: G2/1.0

Hi.  Say I've got a library of code that I actively maintain in ~/
libdir and some code that depends on the library in ~/codedir.  If I
make a change in ~/libdir but do not run make there, I'd like to be
able to check that when building things in ~/codedir, and make the
library in ~/libdir and the targets in ~/codedir that depend on the
library.  The process might look something like this:

  cd ~/codedir
  make
  # cd ~/libdir && make
  # if make was needed, then remake targets in ~/codedir

In essence, I'd like to make running another makefile a prerequisite
to a target in ~/codedir/makefile.  If the prerequisite results in
making updating anything, then the target should be updated.  If the
prerequisite shows that the library was already up to date, then the
target is updated only if some other prerequisite causes it to be
updated.  Does this make sense?  Is this possible in GNU make?

Thanks for any help!

- Chris



reply via email to

[Prev in Thread] Current Thread [Next in Thread]