Date: Sun, 30 Oct 2011 09:11:43 -0700 From: mdf@FreeBSD.org To: lev@freebsd.org Cc: hackers@freebsd.org Subject: Re: How to express inter-directory dependencies in <bsd.*.mk> infrastructure? Message-ID: <CAMBSHm_%2B4C33Ej_SxEF19RmAchMebnU%2BtYp6-TaNXWwp4B6CDg@mail.gmail.com> In-Reply-To: <627176903.20111030200150@serebryakov.spb.ru> References: <627176903.20111030200150@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
2011/10/30 Lev Serebryakov <lev@freebsd.org>: > Hello, Hackers. > > (SORRY FOR SENDING INCOMPLETE MESSAGE) > > How to express inter-directory dependencies in <bsd.*.mk> infrastructure? > > I have project, which has two subdirectories: "lib" and "bin". > Top-level Makefile is simple one, looks like this: > > =================================== > SUBDIR= lib \ > bin > > .include <bsd.subdir.mk> > =================================== > > "lib" subdirectory has Makefile with "<bsd.lib.mk>" included, and > "bin" -- with <bsd.prog.mk> included. > > But how could I express, that PROG in bin depends on LIB from lib, to > cause rebuilding of PROG when LIB is changed (when I call "make" on > top level)? Normally I'd expect the dependency to be handled by make depend; that is, the source for the binary should be #including header files from the library. If the interfaces change, make depend will handle this. I guess the problem comes if you are using static linking and just implementation details internal to the library change. There is a DPADD makefile variable that seems to be used; I'm not sure though if this handles the type of dependency you're wanting. Cheers, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm_%2B4C33Ej_SxEF19RmAchMebnU%2BtYp6-TaNXWwp4B6CDg>
