autoconf-patches
[Top][All Lists]
Advanced

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

Reusing shell code


From: Pavel Roskin
Subject: Reusing shell code
Date: Thu, 28 Sep 2000 06:58:31 -0400 (EDT)

Hello, Akim!

> This is a problem with the source of Autoconf.  I tried several times
> to find an elegant factorization of common code in AC_CONFIG_*S, but
> couldn't find anything interesting idea.  Still, in the future we
> should try to.

Well, I see two ways.

If you don't want to share the code between auto*.sh and config.status you
can use short scripts and call them from auto*.sh, i.e.:

. @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

Regards,
Pavel Roskin




reply via email to

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