[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake too zealous
From: |
Rob Browning |
Subject: |
Re: automake too zealous |
Date: |
Mon, 25 Feb 2002 14:52:32 -0600 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu) |
Thien-Thi Nguyen <address@hidden> writes:
> and we should take care not to use extension .am unless we want an
> associated "makefile".in created.
In other projects I work on, we use a trick that (ironically enough)
originally came from the guile source tree. This trick also makes
sure that any "${}" makefile variables are actually expanded before
the substitutions, which is important if the files being generated are
in a language like scheme or C which don't do variable interpolation.
We always go from foo.in -> foo, though sometimes we'll have more than
one target with foo.in as the input file.
As an example from the gnucash src:
## We borrow guile's convention and use @-...-@ as the substitution
## brackets here, instead of the usual @address@hidden This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions. *sigh*
build-config.scm: build-config.scm.in Makefile
rm -f address@hidden
sed < address@hidden > address@hidden \
-e 's:@-VERSION-@:${VERSION}:' \
-e 's:@-GNC_CONFIGDIR-@:${GNC_CONFIGDIR}:' \
-e 's:@-GNC_SHAREDIR-@:${GNC_SHAREDIR}:' \
-e 's:@-GNC_HELPDIR-@:${GNC_HELPDIR}:'
mv address@hidden $@
CLEANFILES += build-config.scm
FWIW
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD