help-make
[Top][All Lists]
Advanced

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

Re: override target


From: Jiongliang Zhang
Subject: Re: override target
Date: Sat, 14 Aug 2010 14:46:12 +0800

Can you try to define an command variable, maybe you can use like this:

define echo-def
    echo "common"
endef

override define echo-def
    echo "common"
    echo "I am override"
endef

all:
    $(echo-def)

On 11 August 2010 15:42, Lynn Lin <address@hidden> wrote:
All,
   is that possible we can override target (rules)? I know we can use
:: to append target with multi rules.However I define a common
makefile which define a target with rules and I want to override it in
one makefile which include that common makefile

for example :
in common makefile:

all:
   echo "common"

in the other makefile which include that common makefile ,I want to
override rules
all:
   echo "I am override"

when we run make all in makefile,it will run this two rules .I only
want to run the override one

Thanks
Lynn

_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make



--
Best regards!
Thanks
Jiongliang Zhang

reply via email to

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