Hi make experts,
would anyone assist me in writing make rules for the following tasks?
In a make process I have to get verbatim copies (VPATH and vpath will
not work) from files in, say, $(FILES), which are located in $(DIR).
DIR is one directory and FILES is a list of plain file names with no
path prefixes.
So the rules to get the files should look like this:
foo1.a: $(DIR)/foo1.a
cp $^ .
foo2.b: $(DIR)/foo2.b
cp $^ .
...
How can I generate such rules?
I tried using awk to write a .depend.files file and include it which
does not work because include is executed too early.
.INTERMEDIATE: $(FILES)
.depend.files: Makefile
echo '$(FILES)' | gawk '...$(DIR)...' > .depend.files
The files in $(FILES) are needed to generate dependencies:
.depend: .depend.files Makefile $(FILES) $(SRC)
$(CC) -MM ... > .depend
-include .depend .depend.files
How is the correct way to state this? I tried removing Makefile from the
dependencies but that does not work either.
Thanks very much for your help and clues!
Grüß, Georg-Johann
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make