help-make
[Top][All Lists]
Advanced

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

Re: Macro expansion


From: MD.Mahbubur Rahman
Subject: Re: Macro expansion
Date: Wed, 21 Sep 2011 02:18:39 -0700 (PDT)

Sorry friends:  mistakenly typed wrong in the previous mail. Please ignore
the previous mail.

The following code works if the hi lighted change is made:

# $(call program-variables,variable-prefix,file-list)
define program-variables
$1_sources = $(filter %.c,$2)
$1_headers = $(filter %.h,$2)
$1_objects = $(subst .c,.o,$(filter %.c,$2))
$($1_objects): $($1_headers)
endef
ls: $(ls_objects)
$(eval $(call program-variables,ls,ls.c ls.h glob.c glob.h))
show-variables:
# $(ls_sources)
# $(ls_headers)
# $(ls_objects)

Can some one help me why this is needed to make the code works???
-- 
View this message in context: 
http://old.nabble.com/Macro-expansion-tp32503727p32503729.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.




reply via email to

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