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. _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
