help-make
[Top][All Lists]
Advanced

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

newbie needs help with define and eval


From: Chris Chiasson
Subject: newbie needs help with define and eval
Date: Thu, 9 Mar 2006 08:24:31 -0600

Dear GNU Make Gurus,

In writing a makefile for a website, I keep running into what I assume
are (a lack of) variable escaping problems inside my functions written
with "define". Attached, you will find a makefile that I simplified,
but which still exhibits several problems I'm having. I hope you will
tell me why it does not build the output html files as intended and
how to fix it.

Problems (inside define):
1. The automatic variables ( $@ and $< ) appear to generate null strings.
2. References to temporary variables ( $(TMPHTML) ) appear to return
null strings.
3. References to external variables ( $(XSLT) ) appear to return null strings.
4. Variables do not appear to be appended to external variables ( $(HTMLS) ).

In my unsimplified version, number 4 doesn't seem to be happening, but
I can't be sure because I can't isolate it. Also, in my unsimplified
version, the targets are made, but I get weird "one-off" errors, where
the source xml file for target "a" is actually used for target "b" and
the source xml file for target "b" is actually used for target "c",
etc

Here is the output of make all:
Makefile:27: /maketest/tst/t.book.xml
Makefile:28: *** empty variable name.  Stop.

Here is the output of make all if I change eval to warning:
Makefile:27: /maketest/tst/t.book.xml
Makefile:28:  override :=/maketest/tst/t.book.html
 HTMLS+=
  :  /maketest/tst/t.book.xmllint
        xsltproc --nonet -o  html.xsl  /maketest/tst/t.book.xmllint
Makefile:29:
make: Nothing to be done for `all'.

--
http://chris.chiasson.name/

Attachment: Makefile
Description: Binary data


reply via email to

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