Subject: Re: make's .CURDIR availably anywhere else?
To: None <netbsd-users@NetBSD.ORG>
From: Peter Simons <firstname.lastname@example.org>
Date: 01/30/1998 07:24:37
-----BEGIN PGP SIGNED MESSAGE-----
Peter Simons <email@example.com> writes:
> the .CURDIR variable defined by make(1) is immensely useful for me
> when constructing larger projects [...]
Sorry for following up to my own post, but I'd like to clarify on this
subject: Actually .CURDIR is not useful to me at all, as I have found
out after actually using it. :-)
So maybe someone can help me nonetheless. I have the following setup:
In both subdirectories of the project, I'll need to build a liba.a and
libb.a respectively and link it with test.o, to form the main binary.
Usually people build the Makefiles to work recursively in this case,
but that's something I want to avoid. I want the Makefile in the top
of the tree to include the other Makefiles so that I have all the
build and dependency information in just one file, technically
The problem with .CURDIR is, that it will always be pointing at
"my_program" and never at "my_program/liba", since it isn't
reevaluated when including another Makefile.
It seems that VPATH is designed to archieve what I have in mind but
then VPATH is again not compatible between BSD make and GNU make.
Does anyone have any ideas how to do this trick?
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----