help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FRQ: MAKE: substitute recursive makes by new cdinclude


From: Ph. Marek
Subject: FRQ: MAKE: substitute recursive makes by new cdinclude
Date: Mon, 26 Mar 2001 11:45:06 +0200

Hi everybody,

I'm having a problem.


As I heard about the problems with recursive Makefiles I try to avoid them.
But: It's very hard to do so because of the absolute paths needed.

Lately I tried by doing something like

SUBDIR:=c
include $(SUBDIR)/Makefile
SUBDIR:=c++
include $(SUBDIR)/Makefile

with c/Makefile:
SUBDIR?=.
$(SUBDIR)/target1: $(SUBDIR)/target1.c

and the like.

So I can do make in c/ and have only this targets made.
Or I do a make in the parent directory and everything is updated.

But that has several drawbacks (must remember to type $(SUBDIR), another
subdivision gets harder, $(SUBDIR) gets incorrect values in making, ...)


So, I ask for a feature: a new directive cdinclude.

It should work nearly a recursive make: cd to the directory of the
Makefile, and include the file (or prepend the directory to every filename
and cd to it before executing commands, etc.). Then the filenames can be
related to the "current" directory.


Or is there already something like this mechanism and I just didn't find it??


Thanks for all help,


regards

Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]