Make with another make as a prerequisite

[email protected]
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.