It sounds like VPATH or vpath suits your needs.
HTH, Noel
thirunadh rao wrote:
Hi,
I am planning to shift all my Makefiles from "nmake" to GNU Make. So, i want to know if the "viewpathing" feature of "nmake" can be done in GNU Makefiles ?
I am writing this paragraph to explain about
"viewpathing" in nmake. If you already know it then
skip the rest of the message.
Let's say i have 2 nodes in some project, /home/xyz/off/base/ and /home/xyz/dev/base/. Both the
nodes can have same directory structure after "base".
But "/home/xyz/dev/base/" directory contains only
those source files on which a developer is currently
working on. For the sake of simplicity, let's say i
have only one file (a.c ) in "/home/xyz/off/base/". So
my "Makefile" is written as follows in
"/home/xyz/off/base/".
a : a.o cc -o a a.o a.o : a.c cc -c a.c
Let's say my "/home/xyz/dev/base/" is empty. Now if i set VPATH to "/home/xyz/dev:/home/xyz/off" and run "nmake" in "/home/xyz/dev/base/" then it takes a.c from "/home/xyz/off/base" to prepare the target "a" (Here my nmake can fetch "Makefile" from "off" directory because of VPATH setting). If i copy "a.c" to /home/xyz/off/base/" and run the same command then nmake takes "a.c" from /home/xyz/dev/base to prepare the target "a".
Please tell me if the same behavior can be done in GNU Make.
Thanks,
Thiru.
________________________________________________________________________ Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/
_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make
_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make
