[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 18:11:25 +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 17:04, ulugutz wrote:
Ahh ok i get it. Yes in your example it works fine. Maybe it's my bad skill
in writing makefiles but it looks different from my stuff. As i create pdf
file not only from png but also svg and so on i did not use a pattern (i
mean like %.pdf) as a rule. Instead i did something like this :
PNG_FILES := $(wildcard *.png)
SVG_FILES := $(wildcard *.svg)
PDFfrompng_FILES := $(PNG_FILES:.png=.pdf)
PDFfromsvg_FILES := $(PNG_FILES:.svg=.pdf)
.PHONY: all
all: $(PDF_FILES)
PDFfrompng_FILES : PNG_FILES
cp $*.png $@
...
...
Please provide real command for PDFfrompng_FILES.
Because there is place where I don't understand you.
I suggest to append these lines to your example to make you need:
PDF_FILES = $(PDFfrompng_FILES) $(PDFfromsvg_FILES)
$(PDFfrompng_FILES) : %.pdf: %.png
cp $*.png $@
$(PDFfromsvg_FILES) : %.pdf: %.svg
cp $*.svg $@
and so on for any other file type.
--
С уважением, Александр Гавенко.
- 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, 2011/01/27
- Re: target variable ($@) as prerequisite, ulugutz, 2011/01/27
- Re: target variable ($@) as prerequisite,
Oleksandr Gavenko <=
- Re: target variable ($@) as prerequisite, ulugutz, 2011/01/29
- [fixed] Re: target variable ($@) as prerequisite, ulugutz, 2011/01/30