|Subject:||Multiple target patterns|
|Date:||Wed, 11 Jun 2008 10:43:32 -0300|
|User-agent:||Thunderbird 22.214.171.124 (Windows/20080421)|
I have a problem creating makefile with multple target patterns.
Suppose we 2 source folders with files and folders with same names:
Suppose we need somehow to combine every par of files we have there into a 3rd directory, say store (directories dir1 and dir2 are already created inside store).
My idea was to use multiple target patterns, using foreach for directories.
DIRS_SOURCES = . dir1 dir2
store/$(DIR)/%.c: src1/$(DIR)/%.c src2/$(DIR)/%.c
@echo make combination to $@
But this is not working. How can I create such generic makefile without writing
store/%.c: src1/%.c src2/%.c
store/dir1/%.c: src1/dir1/%.c src2/dir1/%.c
store/dir2/%.c: src1/dir2/%.c src2/dir2/%.c
because, i already have many directories inside src1 and src2, and maybe i need to add some other directory fast.
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
|[Prev in Thread]||Current Thread||[Next in Thread]|