[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 8/8] maint: simplify generation of files with @substed@ stuff
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH 8/8] maint: simplify generation of files with @substed@ stuff |
Date: |
Sun, 08 Apr 2012 17:50:29 +0200 |
On 04/08/2012 02:55 PM, Stefano Lattarini wrote:
> Use a proper "config.status --file=-" idiom to do most substitutions
> in our generated files, to avoid too much duplications between the
> various $(do_subst) commands in Makefile.am and the (explicit or
> implicit AC_SUBST) invocation in configure.ac.
>
> From a suggestion by Eric Blake and Federico Simoncelli:
> <http://lists.gnu.org/archive/html/automake/2012-01/msg00011.html>
>
> * Makefile.am (do_subst): Rewrite to take advantage of the
> "config.status --file=-" idiom.
> (generated_file_finalize): New, to help checking that generated
> files don't contain unexpanded '@substitutions@', and are made
> read-only.
> (automake, aclocal): Take advantage of the improved $(do_subst).
> Improve comments.
> (lib/Automake/Config.pm): Likewise, and of the new variable
> $(generated_file_finalize) as well.
> ($(top_srcdir)/m4/amversion.m4): Likewise.
> (defs-static): Likewise, and depend explicitly on 'Makefile'.
> (do_subst_t): Remove as obsolete.
> * THANKS: Update.
>
And consider the hunk below squashed in to avoid a "maintcheck" failure.
Sorry for the noise,
Stefano
-*-*-
diff --git a/Makefile.am b/Makefile.am
index 8bf9200..991de4c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,12 @@ do_subst = ( sed \
-e 's,address@hidden@],$(scriptdir),g' \
-e 's,address@hidden@],$(automake_acdir),g' \
-e 's,address@hidden@],$(system_acdir),g' \
- | $(SHELL) ./config.status --file=- )
+## Hack to avoid a spurious substitution in the Automake script (part 1).
+ -e 's,address@hidden@],address@hidden@!!,g' \
+ | $(SHELL) ./config.status --file=- \
+## Hack to avoid a spurious substitution in the Automake script (part 2).
+ | sed -e 's,address@hidden@!!,@''am__isrc@,g' \
+ )
# Generated files shouldn't contain unexpanded '@substitutions@', and
# should be made read-only, to prevent them from being edited by mistake
- Re: [PATCH] maint: remove most recursion in automake's own build system, (continued)
- Re: [PATCH] maint: remove most recursion in automake's own build system, Stefano Lattarini, 2012/04/05
- Re: [PATCH] maint: remove most recursion in automake's own build system, Stefano Lattarini, 2012/04/06
- Re: [PATCH] maint: remove most recursion in automake's own build system, Jim Meyering, 2012/04/06
- Re: [PATCH] maint: remove most recursion in automake's own build system, Stefano Lattarini, 2012/04/08
- [PATCH 1/8] tests: move most helper scripts and files into the 'ax' subdirectory, Stefano Lattarini, 2012/04/08
- [PATCH 2/8] tests: remove recipes that run tests with 'prove', Stefano Lattarini, 2012/04/08
- [PATCH 5/8] NEWS: automake build systems avoids make recursion, Stefano Lattarini, 2012/04/08
- [PATCH 6/8] docs: fix names of relevant test cases in comments, Stefano Lattarini, 2012/04/08
- [PATCH 7/8] t/README: update w.r.t. recent overhaul (non-recursive build system), Stefano Lattarini, 2012/04/08
- [PATCH 8/8] maint: simplify generation of files with @substed@ stuff, Stefano Lattarini, 2012/04/08
- Re: [PATCH 8/8] maint: simplify generation of files with @substed@ stuff,
Stefano Lattarini <=
- [PATCH 4/8] maint: no more make recursion in Automake's build system, Stefano Lattarini, 2012/04/08
- [PATCH 3/8] tests: rename 'tests/' => 't/', '*.test' => '*.sh', Stefano Lattarini, 2012/04/08
- Re: [PATCH] maint: remove most recursion in automake's own build system, Stefano Lattarini, 2012/04/11