[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make: target-depending prerequisites?

From: Henrik Carlqvist
Subject: Re: make: target-depending prerequisites?
Date: Fri, 23 May 2008 08:13:07 +0200
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

Yves <> wrote:
> My strategy is then to create a variable DEPEND

Do you really need the variables DEPEND and main_depend?

> Unfortunately, this does not seem to work:

My guess is that your problem is the order that make expands variables and
evaluates rules. As you are now using your rules to expand variables those
variables will not be expanded until after the rules have been evaluated.

A more simple and working approach would be:

texfiles = main.tex

all_pdf = $(texfiles:%.tex=%.pdf)

all: $(all_pdf)

main.pdf: section1.tex

%.pdf: %.tex 
        @echo "All prerequisites:" $^
        touch $@

But maybe you have some other reason to have your variable main_depend not
shown in your example?

regards Henrik
The address in the header is only to prevent spam. My real address is:
hc3(at) Examples of addresses which go to spammers:
root@localhost postmaster@localhost

reply via email to

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