automake
[Top][All Lists]
Advanced

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

Re: Scripts...


From: Tom Tromey
Subject: Re: Scripts...
Date: 10 Apr 2001 21:42:14 -0600

>>>>> "Alex" == Alex Turner <address@hidden> writes:

>> For automake I use AC_SUBST and have @...@ substitutions in
>> automake.in.

Alex> Cool - actualy I forgot to ask if this is a sane way to do it
Alex> for C.  I would much prefer it generated a header file with it
Alex> in somewhere.

A header is a bit cleaner but there are some tricky issues regarding
expansion of the prefix.  For instance $(datadir) expands to the text
`$(prefix)/share', which isn't directly usable from C code.

There are various tricks to get around this.  One is a -D option in
the Makefile, since the expansion will be handled by make.  Another
trick is a macro which will expand a path for you.  I think you can
get this from the autoconf macro archive.  Maybe it is in the cvs
autoconf already (if not, it should be, since this comes up quite a
bit).

Alex> P.S. Tom Tromey: Thanks for spending the time to write a book on
Alex> automake etc... it's very very usefull.

You're welcome.  Thank the other authors too, since they did more work
than me.

Tom



reply via email to

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