automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] maint: reduce use of recursion in automake build system


From: Stefano Lattarini
Subject: Re: [PATCH] maint: reduce use of recursion in automake build system
Date: Wed, 28 Mar 2012 22:21:12 +0200

On 03/28/2012 05:19 PM, Stefano Lattarini wrote:
> Recursive make-based build systems tend to be slower, more fragile
> and less faithful than "flat" ones.  See Peter Miller's article
> "Recursive Make Considered Harmful" for more a more in-depth
> discussion:
> 
>   <http://miller.emu.id.au/pmiller/books/rmch/>
> 
> While in the case of automake this isn't a big problem (given the
> small size of its build systems), it still creates occasional
> glitches and annoyances.  So, with this change, we start making
> less use of make recursion in the Automake's won build system.
> 
> * lib/am/Makefile.am, lib/Automake/Makefile.am:  Removed, their
> content merged ...
> * lib/Makefile.am: ... here, with required adjustments.
> * configure.ac (AC_CONFIG_FILES): Update.
> 
Pushed now, with minor adjustments to the commit message and the
fixlet below (required for VPATH builds) squashed in.

Regards,
  Stefano

-*-*-

diff --git a/lib/Makefile.am b/lib/Makefile.am
index b819027..d1800ac 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -97,6 +97,7 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
 ## Use chmod a-w to prevent people from editing the wrong file by accident.
 Automake/Config.pm: Automake/Config.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_at)test -d Automake || mkdir Automake
        $(AM_V_GEN)$(do_subst) $(srcdir)/Automake/Config.in >address@hidden
        $(AM_V_at)chmod a+x,a-w address@hidden && mv -f address@hidden $@
 EXTRA_DIST += Automake/Config.in




reply via email to

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