autoconf-patches
[Top][All Lists]
Advanced

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

Re: Reusing shell code


From: Pavel Roskin
Subject: Re: Reusing shell code
Date: Thu, 28 Sep 2000 07:19:50 -0400 (EDT)

Hello, Akim!

> | . @datadir@/prepare-env
> | . @datadir@/mktmpdir ac
> | 
> | Another way is to use AC_SUBST_FILE. This way, acgeneral.m4 (but not other
> | *.m4) becomes acgeneral.m4.in and has some code in AC_CONFIG_*S
> | substituted from some files. The same code would be substituted in
> | auto*.sh
> 
> Actually I was referring to factoring the source, not the output.

I was also referring to factoring the source. The second variant wouldn't
even affect what goes to the compiled version of autoconf, not to mention
the configure files produced by it.

Currently we have an implementation e.g. for making a secure temp
directory in four _source_ files: autoconf.sh, autoheader.sh,
autoreconf.sh, autoupdate.sh and acgeneral.m4.

We want to have this code in one place. What could we do:

1) Put the common code to a file, say, mktmpdir in the sources.

2) Add "mktmpdir=$(srcdir)/mktmpdir; AC_SUBST_FILE(MKTMPDIR, mktmpdir)" to
the Autoconf's configure.in.

3) Rename acgeneral.m4 to acgeneral.m4.in

4) Replace the common code in autoconf.sh, autoheader.sh, autoreconf.sh,
autoupdate.sh and acgeneral.m4.in with @MKTMPDIR@

5) Adjust Makefile.am

Isn't this factoring the source?

Regards,
Pavel Roskin




reply via email to

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