help-make
[Top][All Lists]
Advanced

[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: Wed, 26 Jan 2011 10:33:59 +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 26.01.2011 9:20, ulugutz wrote:

Hi,

how can you for example do this
------------------------------------
PICS=%.pdf

all: PICS
PICS: $(@:pdf=.png)
         do something
------------------------------------
i would really appreciate your help and sorry if it has been posted already
but I only checked the newest pages of the forum

Why not use:

PNG_FILES := $(wildcard *.png)
PDF_FILES := $(PNG_FILES:.png=.pdf)

all: $(PDF_FILES)

%.pdf: %.png
        png2pdf -o $@ $*.png

or last rule can be rewritten as:

$(PDF_FILES): %.pdf: %.png
        png2pdf -o $@ $*.png

--
С уважением, Александр Гавенко.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]