automake-patches
[Top][All Lists]
Advanced

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

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


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

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.

Signed-off-by: Stefano Lattarini <address@hidden>
---

  I will push this by this evening (to maint) if there is no objection.

  Regards,
    Stefano

 configure.ac             |    2 -
 lib/Automake/Makefile.am |   69 ----------------------------
 lib/Makefile.am          |  114 ++++++++++++++++++++++++++++++++++++++++++++--
 lib/am/Makefile.am       |   65 --------------------------
 4 files changed, 109 insertions(+), 141 deletions(-)
 delete mode 100644 lib/Automake/Makefile.am
 delete mode 100644 lib/am/Makefile.am

diff --git a/configure.ac b/configure.ac
index 18dbd8a..4b0be1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,9 +208,7 @@ AC_CONFIG_FILES([
   Makefile
   contrib/Makefile
   doc/Makefile
-  lib/Automake/Makefile
   lib/Makefile
-  lib/am/Makefile
   m4/Makefile
   tests/Makefile
   tests/defs
diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am
deleted file mode 100644
index ac9356a..0000000
--- a/lib/Automake/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-## Process this file with automake to create Makefile.in
-
-# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010, 2012 Free
-# Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-perllibdir = $(pkgvdatadir)/Automake
-dist_perllib_DATA = \
-  ChannelDefs.pm \
-  Channels.pm \
-  Condition.pm \
-  Configure_ac.pm \
-  DisjConditions.pm \
-  FileUtils.pm \
-  General.pm \
-  Getopt.pm \
-  Item.pm \
-  ItemDef.pm \
-  Location.pm \
-  Options.pm \
-  Rule.pm \
-  RuleDef.pm \
-  Struct.pm \
-  Variable.pm \
-  VarDef.pm \
-  Version.pm \
-  XFile.pm \
-  Wrap.pm
-
-nodist_perllib_DATA = \
-  Config.pm
-
-CLEANFILES = $(nodist_perllib_DATA)
-
-## We can't use configure to do the substitution here; we must do it
-## by hand.  We use a funny notation here to avoid configure
-## substitutions in our text.
-do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
-  -e 's,address@hidden@],$(APIVERSION),g' \
-  -e 's,address@hidden@],$(PACKAGE),g' \
-  -e 's,address@hidden@],$(PACKAGE_BUGREPORT),g' \
-  -e 's,address@hidden@],$(PERL),g' \
-  -e 's,address@hidden@],$(PERL_THREADS),g' \
-  -e 's,address@hidden@],$(SHELL),g' \
-  -e 's,address@hidden@],$(VERSION),g' \
-  -e "s,address@hidden@],Generated from $$in.in; do not edit by hand.,g" \
-  -e 's,address@hidden@],$(datadir),g'
-
-## This file depends on Makefile so it is rebuilt if $(VERSION),
-## $(datadir) or other do_subst'ituted variables change.
-## Use chmod a-w to prevent people from editing the wrong file by accident.
-Config.pm: Config.in Makefile
-       $(AM_V_at)rm -f $@ address@hidden
-       $(AM_V_GEN)$(do_subst) $(srcdir)/Config.in >address@hidden
-       $(AM_V_at)chmod a+x,a-w address@hidden && mv -f address@hidden $@
-
-EXTRA_DIST = Config.in
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d9dabb6..b819027 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,8 +2,7 @@
 
 ## Makefile for Automake lib.
 
-# Copyright (C) 2001, 2003, 2004, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +17,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-SUBDIRS = Automake am
+EXTRA_DIST = gnupload gitlog-to-changelog update-copyright
+
+## -------------------------------------------------------------------- ##
+##  Auxiliary scripts and files for use with "automake --add-missing".  ##
+## -------------------------------------------------------------------- ##
 
 dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
   config-ml.in
@@ -31,8 +34,6 @@ dist_script_DATA = config.guess config.sub install-sh 
mdate-sh missing \
   mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
   symlink-tree ar-lib
 
-EXTRA_DIST = gnupload gitlog-to-changelog update-copyright
-
 install-data-hook:
        @$(POST_INSTALL)
        @for prog in $(dist_script_DATA); do \
@@ -46,3 +47,106 @@ installcheck-local:
        for file in $(dist_script_DATA); do \
          $(PERL) -e "exit ! -x '$(pkgvdatadir)/$$file';" || exit 1; \
        done
+
+## ---------------------------------------------------- ##
+##  Private perl modules used by automake and aclocal.  ##
+## ---------------------------------------------------- ##
+
+perllibdir = $(pkgvdatadir)/Automake
+dist_perllib_DATA = \
+  Automake/ChannelDefs.pm \
+  Automake/Channels.pm \
+  Automake/Condition.pm \
+  Automake/Configure_ac.pm \
+  Automake/DisjConditions.pm \
+  Automake/FileUtils.pm \
+  Automake/General.pm \
+  Automake/Getopt.pm \
+  Automake/Item.pm \
+  Automake/ItemDef.pm \
+  Automake/Location.pm \
+  Automake/Options.pm \
+  Automake/Rule.pm \
+  Automake/RuleDef.pm \
+  Automake/Struct.pm \
+  Automake/Variable.pm \
+  Automake/VarDef.pm \
+  Automake/Version.pm \
+  Automake/XFile.pm \
+  Automake/Wrap.pm
+
+nodist_perllib_DATA = Automake/Config.pm
+CLEANFILES = $(nodist_perllib_DATA)
+
+## We can't use configure to do the substitution here; we must do it
+## by hand.  We use a funny notation here to avoid configure
+## substitutions in our text.
+do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
+  -e 's,address@hidden@],$(APIVERSION),g' \
+  -e 's,address@hidden@],$(PACKAGE),g' \
+  -e 's,address@hidden@],$(PACKAGE_BUGREPORT),g' \
+  -e 's,address@hidden@],$(PERL),g' \
+  -e 's,address@hidden@],$(PERL_THREADS),g' \
+  -e 's,address@hidden@],$(SHELL),g' \
+  -e 's,address@hidden@],$(VERSION),g' \
+  -e "s,address@hidden@],Generated from $$in.in; do not edit by hand.,g" \
+  -e 's,address@hidden@],$(datadir),g'
+
+## This file depends on Makefile so it is rebuilt if $(VERSION),
+## $(datadir) or other do_subst'ituted variables change.
+## 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_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
+
+## --------------------- ##
+##  Makefile fragments.  ##
+## --------------------- ##
+
+amdir = $(pkgvdatadir)/am
+
+dist_am_DATA = \
+  am/ansi2knr.am \
+  am/check.am \
+  am/check-html.am \
+  am/check2.am \
+  am/clean-hdr.am \
+  am/clean.am \
+  am/compile.am \
+  am/configure.am \
+  am/data.am \
+  am/dejagnu.am \
+  am/depend.am \
+  am/depend2.am \
+  am/distdir.am \
+  am/footer.am \
+  am/header-vars.am \
+  am/header.am \
+  am/install.am \
+  am/inst-vars.am \
+  am/java.am \
+  am/lang-compile.am \
+  am/lex.am \
+  am/library.am \
+  am/libs.am \
+  am/libtool.am \
+  am/lisp.am \
+  am/ltlib.am \
+  am/ltlibrary.am \
+  am/mans-vars.am \
+  am/mans.am \
+  am/multilib.am \
+  am/program.am \
+  am/progs.am \
+  am/python.am \
+  am/remake-hdr.am \
+  am/scripts.am \
+  am/subdirs.am \
+  am/tags.am \
+  am/texi-vers.am \
+  am/texibuild.am \
+  am/texinfos.am \
+  am/vala.am \
+  am/yacc.am
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
deleted file mode 100644
index 7b37989..0000000
--- a/lib/am/Makefile.am
+++ /dev/null
@@ -1,65 +0,0 @@
-## Process this file with automake to create Makefile.in
-
-## Makefile for Automake lib/am.
-
-# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008,
-# 2009, 2012 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-amdir = $(pkgvdatadir)/am
-
-dist_am_DATA = \
-ansi2knr.am \
-check.am \
-check-html.am \
-check2.am \
-clean-hdr.am \
-clean.am \
-compile.am \
-configure.am \
-data.am \
-dejagnu.am \
-depend.am \
-depend2.am \
-distdir.am \
-footer.am \
-header-vars.am \
-header.am \
-install.am \
-inst-vars.am \
-java.am \
-lang-compile.am \
-lex.am \
-library.am \
-libs.am \
-libtool.am \
-lisp.am \
-ltlib.am \
-ltlibrary.am \
-mans-vars.am \
-mans.am \
-multilib.am \
-program.am \
-progs.am \
-python.am \
-remake-hdr.am \
-scripts.am \
-subdirs.am \
-tags.am \
-texi-vers.am \
-texibuild.am \
-texinfos.am \
-vala.am \
-yacc.am
-- 
1.7.9




reply via email to

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