[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: Wed, 26 Jan 2011 10:33:59 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20101207 Thunderbird/3.1.7

On 26.01.2011 9:20, ulugutz wrote:


how can you for example do this

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]