automake
[Top][All Lists]
Advanced

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

Re: Variable substitution in source files


From: Eric Siegerman
Subject: Re: Variable substitution in source files
Date: Mon, 15 Sep 2003 15:45:56 -0400
User-agent: Mutt/1.2.5i

On Sat, Sep 13, 2003 at 06:04:43AM -0700, Bill Moseley wrote:
> foo: foo.in
>         @rm -f foo
>         @sed \
>                 -e 's,@@perlmoduledir@@,$(libexecdir)/perl,' \
>                 -e 's,@@swishbindir@@,$(bindir),' \
>                 -e 's,@@perlbinary@@,$(PERL),' \
>                         $(srcdir)/foo.in > foo
> 
> But I'm doing that in more and more Makefile.am files in my project 
> tree

You could write a shell script containing the appropriate sed
commands, and call AC_CONFIG_FILES() on it to get the values into
it.  Then call the script from the Makefiles, either explicitly
or via an implicit rule.

> -- and sometimes I need to do it to a file where there isn't a 
> Makefile in that directory.

So add one...

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
When I came back around from the dark side, there in front of me would
be the landing area where the crew was, and the Earth, all in the view
of my window. I couldn't help but think that there in front of me was
all of humanity, except me.
        - Michael Collins, Apollo 11 Command Module Pilot





reply via email to

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