Hi!

I issued this some days ago. Now I boiled the problem down to a very simple makefile example. It seems to me that to a pattern rule one can not add an explicit prerequiste. Take a look at this:


%.eps:
        touch $@

%.dvi: %.tex e.eps
        latex $<

%.pdf: %.dvi
        dvipdf $<


and say we have a file "some.tex" in the current directory:


% ls
Makefile some.tex


Then "make some.pdf" will not see the implicit rule for making the target some.pdf:


% make -n some.pdf
tex some.tex
dvipdf some.dvi
rm some.dvi


As you can see, "tex" was invoked, instead of "latex". A built-in rule was applied.

Now, lets make forget all the built-in rules, with putting an .SUFFIXES: in front:



.SUFFIXES:

%.eps:
        touch $@

%.dvi: %.tex e.eps
        latex $<

%.pdf: %.dvi
        dvipdf $<



And repeat:



% make -n some.pdf
touch e.eps
latex some.tex
dvipdf some.dvi
rm some.dvi e.eps


We see, it works. "latex" gets called - as supposed.

For some reason, make prefers to apply a built-in rule rather than the "mixed" implicit-explicit rule.

Is this a bug or a feature?

Frank



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to