Boris Godin wrote on 11 June 2008 17:00:
> Guys, i have a new problem:
> this code transforms all into one single line,
>
> $(foreach DIR,$(DIRS_SOURCES),\
> store/$(DIR)/%.c: src1/$(DIR)/%.c src2/$(DIR)/%.c; \
> @echo make combination to $@;\
> )
Yep. Look up how to use 'define' to make a multi-line variable
definition. Then use a function call to insert each value of dir into it.
It'll end up looking something roughly like this (untested):
define make_store
store/$(1)/%.c: src1/$(1)/%.c src2/$(1)/%.c;
@echo make combination to $@;
endef
$(eval $(foreach DIR,$(DIRS_SOURCES),$(call make_store,$(DIR))))
cheers,
DaveK
--
Can't think of a witty .sigline today....
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make