[EMAIL PROTECTED] wrote:

Hi Paul,

If I need to have this details else where, not in the command script. Is it possible?.

eg:

my makefile contains
"
include test.mk
all: a b c d
"
i am including a file test.mk in the makefile. In this test.mk I need to do the 
following
if d is mentioned in the all target I need to include
d.mk

Thanks for your help

Regards
bhaskar


I am not aware of any such feature in 3.79 (that allows you to have any
knowlage of a.) what global target make was invoked with or b.) extract a
list of prerequisites for a given target at the global "scope" i.e. not
in the target scope).


Even though this is not really an answer to your question; you may consider using an aproach similar to the following:

========= Makefile ========
PREREQS=a b c d

include test.mk

all: $(PREREQS)


======== test.mk ======== either: -include $(patsubst %, %.mk, $(PREREQS))

or:

ifeq ($(findstring d, $(PREREQS)),d)
include d.mk
endif

==========================


Hope this helps, -Tristan






_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to