[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replacement of variable placeholders in files
From: |
Bernd Jendrissek |
Subject: |
Re: replacement of variable placeholders in files |
Date: |
Wed, 22 Aug 2007 13:38:52 +0200 |
On 8/22/07, Jason Curl <address@hidden> wrote:
> Dizzy wrote:
> > project.conf:project.conf.in $(top_builddir)/config.status
> > $(SED) -e 'address@hidden/@'"${localstatedir}/@g"
> > $(top_srcdir)/conf/project.conf.in > $@
You're telling sed to match end-of-line with '$'. And make is eating
the ${LOCALSTATEDIR} before sed sees it. Try this:
$(SED) -e 'address@hidden@address@hidden'
> Instead of having the Makefile do this for you, why not during
> 'configure' time with the AC_CONFIG_FILES? And then define the variable
> substitutions as part of the configure script? Even define a macro if
> you want to logically separate everything.
See info node 'Installation Directory Variables':
> Similarly you should not rely on `AC_OUTPUT_FILES' to replace
>`datadir' and friends in your shell scripts and other files, rather let
>`make' manage their replacement. For instance Autoconf ships templates
>of its shell scripts ending with `.in', and uses a Makefile snippet
>similar to:
>[...]