help-make
[Top][All Lists]
Advanced

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

Clarification Needed on -C option


From: Ajay Jain
Subject: Clarification Needed on -C option
Date: Fri, 2 Sep 2011 10:37:13 +0530

Hi Experts,

I use a make -C option in my top-level Makefile. This calls a leaf
Makefile to build, and checks CONFIG variable. If it not specified, it
assigns a default configuration to the same variable. The snippet is
as follows.

ifeq ("$(CONFIG)","")
 $(info CONFIG Not Specified)
 CONFIG = $(DEFAULT_CONFIG)
 $(info Setting CONFIG to Default : $(CONFIG))
endif

I see that this snipped executes twice in every invocation of Make.
This is undesirable, What am I missing? Is there any alternative? I
want the assignment only once :-)

Regards,
Ajay



reply via email to

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