It depends upon what you mean by nice ;-)
Using GNU make 3.80 and above, you can define a function that does the include
for you and also sets a make variable to be the file being included. This
variable may then be used by the included file.
Noel
lists wrote:
I want an included makefile to be able to identify itself (or atleast
its directory). Take the following example:
/prog/Makefile
/prog/apples/Makefile.mk
The /prog/Makefile uses "include apples/Makefile.mk" to call another
makefile. I need the apples/Makefile.mk to know where it is. If I use
$(shell pwd) I get the location of the root Makefile instead. I'm using
Make 3.79.1 (and am stuck with it) so I can't use the MAKEFILE_LIST
variable.
Is there a nice way of doing this?
-
natch
_______________________________________________
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