[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: target variable ($@) as prerequisite
From: |
Oleksandr Gavenko |
Subject: |
Re: target variable ($@) as prerequisite |
Date: |
Thu, 27 Jan 2011 15:42:17 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 27.01.2011 11:59, ulugutz wrote:
nope i am right. every target has the same dependency list. you agree with
that, right?
For which rules. In written code
PNG_FILES := $(wildcard *.png)
PDF_FILES := $(PNG_FILES:.png=.pdf)
.PHONY: all
all: $(PDF_FILES)
%.pdf: %.png
cp $*.png $@
See what happen:
$ touch 1.png 2.png
$ make
cp 1.png 1.pdf
cp 2.png 2.pdf
$ LANG=C make
make: Nothing to be done for `all'.
$ touch 2.png
$ make
cp 2.png 2.pdf
Only one 'cp' operation take place in last case.
so if one timestamp of the dependencies changes all PDFs are
out of date :-/
Your case possible if write such dependency:
1.pdf 2.pdf: 1.png 2.png
i want to have only the png associated to the target in the dependency list.
See top description.
Or may be you need explain where I don't understand you.
--
С уважением, Александр Гавенко.
- target variable ($@) as prerequisite, ulugutz, 2011/01/26
- Re: target variable ($@) as prerequisite, Oleksandr Gavenko, 2011/01/26
- Re: target variable ($@) as prerequisite, ulugutz, 2011/01/26
- Re: target variable ($@) as prerequisite, Oleksandr Gavenko, 2011/01/26
- Re: target variable ($@) as prerequisite, ulugutz, 2011/01/27
- Re: target variable ($@) as prerequisite,
Oleksandr Gavenko <=
- Re: target variable ($@) as prerequisite, ulugutz, 2011/01/27
- Re: target variable ($@) as prerequisite, Oleksandr Gavenko, 2011/01/27
- Re: target variable ($@) as prerequisite, ulugutz, 2011/01/29
- [fixed] Re: target variable ($@) as prerequisite, ulugutz, 2011/01/30