[Top][All Lists]

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

Re: variables in

From: Ralf Wildenhues
Subject: Re: variables in
Date: Mon, 12 Sep 2005 16:39:45 +0200
User-agent: Mutt/1.4.1i

Hi Matthias,

* Matthias Langer wrote on Mon, Sep 12, 2005 at 04:00:34PM CEST:
> I'm trying to to the following in my
> VTK_LIBS=$vtk_lib_path
> VTK_LIBS+="-lvtkFiltering -lvtkfreetype -lvtkftgl -lvtkGraphics 
> -lvtkHybrid" \
>                       "-lvtkImaging -lvtkIO -lvtkRendering"
> However, when i run configure, i get
> ...: VTK_LIBS+=-lvtkFiltering -lvtkfreetype -lvtkftgl -lvtkGraphics 
> -lvtkHybrid: command not found
> Can anybody tell my what i'm doing wrong ?

You are mixing up Automake macro notation and shell parameter notation.
Bourne-like shell parameters go like this, for example:

foo="some value"
foo="$foo something added at the end"
foo="something added at the beggining $foo"
baz="this spans
more than one line"

make-like macros go like this:

foo = bar
baz = $(foo) more baz appended
boo = this spans \
      more than one line

(spaces around `=' not needed but help distinction from shell syntax.)

Automake-created Makefiles also allow you to use `+=' to "add" to

foo = bar
foo += more bar

Not all versions of Automake append with `+=' in order, by the way (the
order of the result of several appends is unspecified with all released
versions of Automake; this has been fixed in CVS Automake on

GNU make also has `+=', as an extension to ordinary `make' syntax.
(I believe the GNU make extension is what prompted implementation of the
Automake feature.)

Did I help to confuse you completely now?  :)

Oh, I forgot: usually consists of some Autoconf macros plus
Bourne shell script snippets, so there, you would use the first syntax
there.  And with the AC_SUBST macro you can get the value of shell
parameters from to end up as `make' macros in Makefile. :-)


reply via email to

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