Hello,
I've some troubles with make. I want to do some thing, but I don't
know, how to do it. I'm newbie in make, so sorry for stupid questions :)
IDEA:
I have *.in files. I want to convert them through M4 and some other
filters into *.out files and put into output dir.
For example:
/path/to/m4
1.m4
2.m4
/path/to/in-1/
A/
a1.in
AB/
ab1.in
/path/to/in-2/
B/
b1.in
When I execute make, I want to have following result:
/outdir/
A/
a1.out
AB/
ab1.out
B/
b1.out
I wrote Makefile:
FILES = $(patsubst %.in,%.out,$(wildcard *.in))
SUBDIRS = $(shell find ... ) # to give list of subdirs for current
# dir
vpath %.m4 /path/to/m4
all: $(FILES) $(SUBDIRS) ;
$(SUBDIRS):
$(MAKE) -C $@
%.out : %.in 1.m4 2.m4
m4 -E -P .. | filter ... > $@
.PHONY: all $(SUBDIRS)
But I have a couple of problems:
- If one of M4-files is missed, I've got error:
Cannot find rule for `a1.out'
instead of something like:
Cannot find rule for `missed.m4'
- I can't write code, to put *.out files into corresponding subdirs
of OUTIDR. I want to have an ability to set OUTDIR as relative
path (../outdir) and as absolute (/usr/local/...).
- When I run `make -p', I've got VERY LONG list of actions. I think,
there is some way to reduce it, but I don't know it...
(I'm going to run make frequently, so performance is important)
I appreciate any help.
--
Best regards,
Andrew
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make