[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dependency line is hidden when adding a dependency
From: |
Frank Winter |
Subject: |
Re: dependency line is hidden when adding a dependency |
Date: |
Tue, 16 Feb 2010 10:15:17 +0100 (CET) |
User-agent: |
Alpine 2.00 (LRH 1167 2008-08-23) |
Hi!
Thank you for your answer!
I have a strange behaviour here. If I add the dependencies "pfps.eps
pfpscut.eps" to the line, the rule gets for some reason not applied, and
instead a "build-in" rule gets applied:
%.dvi: %.tex pfps.eps pfpscut.eps
latex $<
The most common reason for this is that these other two prerequisites do
not exist and make doesn't know how to remake them. If that's true then
make will ignore this pattern rule since it cannot match, and look for
another one.
The two prerequisites do not exist as targets in the makefile, that's
right. But they do exist as readable files in the same directory.
I tried the following and the rule gets applied:
-------------------------------------------------
.PHONY: pfps.eps pfpscut.eps
pfps.eps:
pfpscut.eps:
%.dvi: %.tex pfps.eps pfpscut.eps
latex $<
%.pdf: %.dvi
dvipdf $<
-------------------------------------------------
% make -n fps.pdf
latex fps.tex
dvipdf fps.dvi
rm fps.dvi
It's strange, that the rule doesn't apply if the prerequisites just exist
as files in the directory.
Now that this worked, i moved on towards the real example and the rule
again does not get applied:
-------------------------------------------------
.PHONY: 1.gp
1.gp:
%.eps: 1.gp
gnuplot $<
%.dvi: %.tex pfps.eps pfpscut.eps
latex $<
%.pdf: %.dvi
dvipdf $<
-------------------------------------------------
% make -n fps.pdf
tex fps.tex
dvipdf fps.dvi
rm fps.dvi
The two EPS prerequisites should be creatable by the rule %.eps but make
fails to apply it. Please find below the output of make -n -d
Of course, the file "fps.tex" exists as well. In fact I provide an ls
output of the directory. Please find it at the bottom of this mail.
Frank
GNU Make 3.81
This program built for x86_64-redhat-linux-gnu
Reading makefiles...
Reading makefile `Makefile'...
Updating makefiles....
Considering target file `Makefile'.
Looking for an implicit rule for `Makefile'.
Trying pattern rule with stem `Makefile'.
Trying implicit prerequisite `Makefile.o'.
Trying pattern rule with stem `Makefile'.
... ( a lot of this stuff )
Finished prerequisites of target file `Makefile'.
No need to remake target `Makefile'.
Updating goal targets....
Considering target file `fps.pdf'.
File `fps.pdf' does not exist.
Looking for an implicit rule for `fps.pdf'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.dvi'.
Trying pattern rule with stem `fps.pdf'.
Trying implicit prerequisite `fps.pdf,v'.
Trying pattern rule with stem `fps.pdf'.
Trying implicit prerequisite `RCS/fps.pdf,v'.
Trying pattern rule with stem `fps.pdf'.
Trying implicit prerequisite `RCS/fps.pdf'.
Trying pattern rule with stem `fps.pdf'.
Trying implicit prerequisite `s.fps.pdf'.
Trying pattern rule with stem `fps.pdf'.
Trying implicit prerequisite `SCCS/s.fps.pdf'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.dvi'.
Looking for a rule with intermediate file `fps.dvi'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.tex'.
Trying rule prerequisite `pfps.eps'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.tex'.
Found an implicit rule for `fps.pdf'.
Considering target file `fps.tex'.
Looking for an implicit rule for `fps.tex'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.w'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.web'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.w'.
Trying pattern rule with stem `fps.tex'.
Trying implicit prerequisite `fps.tex,v'.
Trying pattern rule with stem `fps.tex'.
Trying implicit prerequisite `RCS/fps.tex,v'.
Trying pattern rule with stem `fps.tex'.
Trying implicit prerequisite `RCS/fps.tex'.
Trying pattern rule with stem `fps.tex'.
Trying implicit prerequisite `s.fps.tex'.
Trying pattern rule with stem `fps.tex'.
Trying implicit prerequisite `SCCS/s.fps.tex'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.w'.
Looking for a rule with intermediate file `fps.w'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `fps.w'.
Trying implicit prerequisite `fps.w,v'.
Trying pattern rule with stem `fps.w'.
Trying implicit prerequisite `RCS/fps.w,v'.
Trying pattern rule with stem `fps.w'.
Trying implicit prerequisite `RCS/fps.w'.
Trying pattern rule with stem `fps.w'.
Trying implicit prerequisite `s.fps.w'.
Trying pattern rule with stem `fps.w'.
Trying implicit prerequisite `SCCS/s.fps.w'.
Trying pattern rule with stem `fps'.
Trying implicit prerequisite `fps.web'.
Looking for a rule with intermediate file `fps.web'.
Avoiding implicit rule recursion.
Trying pattern rule with stem `fps.web'.
Trying implicit prerequisite `fps.web,v'.
Trying pattern rule with stem `fps.web'.
Trying implicit prerequisite `RCS/fps.web,v'.
Trying pattern rule with stem `fps.web'.
Trying implicit prerequisite `RCS/fps.web'.
Trying pattern rule with stem `fps.web'.
Trying implicit prerequisite `s.fps.web'.
Trying pattern rule with stem `fps.web'.
Trying implicit prerequisite `SCCS/s.fps.web'.
Trying pattern rule with stem `fps'.
Rejecting impossible implicit prerequisite `fps.w'.
No implicit rule found for `fps.tex'.
Finished prerequisites of target file `fps.tex'.
No need to remake target `fps.tex'.
Considering target file `fps.dvi'.
File `fps.dvi' does not exist.
Pruning file `fps.tex'.
Finished prerequisites of target file `fps.dvi'.
Must remake target `fps.dvi'.
tex fps.tex
Successfully remade target file `fps.dvi'.
Finished prerequisites of target file `fps.pdf'.
Must remake target `fps.pdf'.
dvipdf fps.dvi
Successfully remade target file `fps.pdf'.
Removing intermediate files...
rm fps.dvi
% ls
Makefile Makefile.success1 b5p29.res common.gp~ fitb5p20.res
fitb5p25.res fitb5p29.res fitb5p40.res fps.aux fps.tex mps.dat
pfpscut.gp r0chiral.dat
Makefile.save Makefile~ b5p40.res fitFps.res fitb5p20.xml
fitb5p25.xml fitb5p29.xml fitb5p40.xml fps.dat fps.tex~ pfps.gp
pfpscut.gp~
Makefile.save~ ZA.dat common.gp fitFps.xml fitb5p20.xml~
fitb5p25.xml~ fitb5p29.xml~ fitb5p40.xml~ fps.log minuit.log pfps.gp~
qa.log