[Top][All Lists]

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

Re: generating

From: Maxim Yegorushkin
Subject: Re: generating
Date: Fri, 18 Dec 2009 18:17:02 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4

On 18/12/09 07:07, Ling F. Zhang wrote:

I am writing a file to type set LaTeX.  So I have a shell script which parse 
the .tex file quickly and print out an include list:
$ mktexdep file.tex

In the Makefile, I have this line:
%.pdf : $$(shell mktexdep $$(subst pdf,tex,$$@))

Which would actually turn the above list into a prerequisite list. It works.

All's well.  Since mktexdep itself is a simple shell script consists of a few 
greps/awk, I am wondering if I can do the whole thing within the Makefile.

I tried the following so far:
define mktexdep
   (shell commands acting on $1 to make dep list)

%.pdf : $$(call funcmktexdep,$$(subst pdf,tex,$$@))

It doesn't work.

Any ideas?

Calling funcmktexdep macro returns the text of the macro definition, rather than executing the definition. To execute that text $(eval text) is needed.

Try this:

%.pdf : $$(eval $$(call funcmktexdep,$$(subst pdf,tex,$$@)))


reply via email to

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