autoconf
[Top][All Lists]
Advanced

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

Re: Autoconf variable *manipulation* in .in files?


From: roth . gnu
Subject: Re: Autoconf variable *manipulation* in .in files?
Date: 17 Apr 2002 09:39:42 -0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

==> "dk" == Dan Kegel <address@hidden> writes:

    dk> I'm writing a build system that places one Make include file
    dk> in each directory, and includes them from a single master
    dk> Makefile recursively.  It can handle builds for multiple
    dk> architectures all in the same run, without recursive
    dk> invocations of Make.

    dk> Along the way, I got a strange craving for being able to
    dk> create local tempoarary autoconf variables, for elimination of
    dk> common subexpressions that are too ephemeral to merit mention
    dk> in configure.ac.

    dk> I know, this is getting away from the original autoconf
    dk> concept of 'variables are defined in configure.ac, and
    dk> expanded in .in files', but it's not *that* far away.

    dk> Has anyone else had similar urges?  - Dan

I wrote a 'make.status' script once that did what config.status does,
except for Makefile variable bindings.  This was for when I needed
generated sources that included fully-expanded $subdir, $CFLAGS,
etc. that weren't defined fully in config.status.  The process went
something like this:

* Filter variable bindings to a slimmed-down Makefile
* Added tag-emitter targets to output variables as per make expansion
  rules
* Iterate through each binding and create a 'sed' script
* Munge the output files using 'sed'.

The 'sed' route that config.status uses is slow.  You would probably
want to use block-based regular expression substitution using Perl or
Python, I think.

-- C




reply via email to

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