[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/17] build: no more recursion for 'lib/m4sugar' subdir
From: |
Stefano Lattarini |
Subject: |
[PATCH v2 08/17] build: no more recursion for 'lib/m4sugar' subdir |
Date: |
Mon, 6 May 2013 15:21:15 +0200 |
* lib/m4sugar/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'lib/m4sugar'.
Other related adjustments and re-organizations.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/m4sugar/Makefile'.
* lib/freeze.mk ($(build_libdir)/m4sugar/version.m4): Adjust
recipe.
Signed-off-by: Stefano Lattarini <address@hidden>
---
configure.ac | 1 -
lib/Makefile.am | 81 ++++++++++++++++++++++++++++++++++++++++++-------
lib/freeze.mk | 2 +-
lib/m4sugar/Makefile.am | 75 ---------------------------------------------
4 files changed, 71 insertions(+), 88 deletions(-)
delete mode 100644 lib/m4sugar/Makefile.am
diff --git a/configure.ac b/configure.ac
index 3dac41c..79ff609 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,7 +208,6 @@ AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
AC_CONFIG_FILES([Makefile
lib/Makefile lib/Autom4te/Makefile
- lib/m4sugar/Makefile
lib/autoconf/Makefile
])
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d28f7d7..832693a 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -15,12 +15,26 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-## Required by rules to build autoscan and autotest libraries.
+TAGS_FILES = # Incrementally updated later.
+ETAGS_ARGS = # Likewise.
+EXTRA_DIST = # Likewise.
+
+## Required by rules to build several m4 libraries.
include $(srcdir)/freeze.mk
-SUBDIRS = Autom4te m4sugar autoconf
+## Checks.
+check-local: check-forbidden-patterns
+forbidden_patterns = -e '^_*EOF' -e ' cmp '
+forbidden_patterns_files = # Incrementally updated later.
+
+SUBDIRS = Autom4te autoconf
+
+## ------------------------------------------ ##
+## Make Autom4te default configuration file. ##
+## ------------------------------------------ ##
+
nodist_pkgdata_DATA = autom4te.cfg
-EXTRA_DIST = autom4te.in
+EXTRA_DIST += autom4te.in
edit = sed \
-e 's|@address@hidden|$(SHELL)|g' \
@@ -75,6 +89,56 @@ autoscan/autoscan.list: $(srcdir)/autoscan/autoscan.pre
$(autoconf_m4f_dependenc
$(MY_AUTOM4TE) --cache '' -M -l autoconf -t'AN_OUTPUT:$$1: $$2
$$3' \
) | LC_ALL=C sort >>$@
+## ----------------------------------- ##
+## Make Autoconf library for M4sugar. ##
+## ----------------------------------- ##
+
+m4sugarlibdir = $(pkgdatadir)/m4sugar
+
+dist_m4sugarlib_DATA = \
+ m4sugar/m4sugar.m4 \
+ m4sugar/foreach.m4 \
+ m4sugar/m4sh.m4
+
+nodist_m4sugarlib_DATA = \
+ m4sugar/version.m4 \
+ m4sugar/m4sugar.m4f \
+ m4sugar/m4sh.m4f
+
+CLEANFILES += $(nodist_m4sugarlib_DATA)
+
+# Get the release year from ../ChangeLog.
+RELEASE_YEAR = \
+ `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
+
+# The ':;' in the second line of the recipe works around a redirected
+# compound command bash exit status bug.
+m4sugar/version.m4: Makefile
+ $(MKDIR_P) $(@D)
+ :;{ \
+ echo '# This file is part of -*- Autoconf -*-.' && \
+ echo '# Version of Autoconf.' && \
+ echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \
+ echo '# Free Software Foundation, Inc.' && \
+ echo &&\
+ echo 'm4_define([m4_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
+ echo 'm4_define([m4_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
+ echo 'm4_define([m4_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
+ echo 'm4_define([m4_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
+ echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
+ echo 'm4_define([m4_PACKAGE_URL], [$(PACKAGE_URL)])' && \
+ echo 'm4_define([m4_PACKAGE_YEAR], ['$(RELEASE_YEAR)'])'; \
+ } > address@hidden
+ mv address@hidden $@
+
+TAGS_FILES += $(dist_m4sugarlib_DATA)
+ETAGS_ARGS += $(ETAGS_FOR_AUTOCONF)
+
+forbidden_patterns_files += $(dist_m4sugarlib_DATA)
+
+m4sugar/m4sugar.m4f: $(m4sugar_m4f_dependencies)
+m4sugar/m4sh.m4f: $(m4sh_m4f_dependencies)
+
## ----------------------- ##
## Make Autotest library. ##
## ----------------------- ##
@@ -89,14 +153,9 @@ dist_autotestlib_DATA = \
nodist_autotestlib_DATA = autotest/autotest.m4f
CLEANFILES += $(nodist_autotestlib_DATA)
-## Building TAGS.
-TAGS_FILES = $(dist_autotestlib_DATA)
-ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF)
+TAGS_FILES += $(dist_autotestlib_DATA)
+ETAGS_ARGS += $(ETAGS_FOR_AUTOCONF)
-## Checks.
-check-local: check-forbidden-patterns
-forbidden_patterns = -e '^_*EOF' -e ' cmp '
-forbidden_patterns_files = $(dist_autotestlib_DATA)
+forbidden_patterns_files += $(dist_autotestlib_DATA)
-## The frozen files.
autotest/autotest.m4f: $(autotest_m4f_dependencies)
diff --git a/lib/freeze.mk b/lib/freeze.mk
index a969e43..60d3614 100644
--- a/lib/freeze.mk
+++ b/lib/freeze.mk
@@ -58,7 +58,7 @@ m4f_dependencies = $(top_builddir)/bin/autom4te
$(AUTOM4TE_CFG)
# For parallel builds.
$(build_libdir)/m4sugar/version.m4:
- cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4
+ cd $(build_libdir) && $(MAKE) $(AM_MAKEFLAGS) m4sugar/version.m4
m4sugar_m4f_dependencies = \
$(m4f_dependencies) \
diff --git a/lib/m4sugar/Makefile.am b/lib/m4sugar/Makefile.am
deleted file mode 100644
index f3e6af0..0000000
--- a/lib/m4sugar/Makefile.am
+++ /dev/null
@@ -1,75 +0,0 @@
-# Make Autoconf library for M4sugar.
-
-# Copyright (C) 2001-2002, 2006-2013 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 3 of the License, 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/>.
-
-m4sugarlibdir = $(pkgdatadir)/m4sugar
-dist_m4sugarlib_DATA = m4sugar.m4 foreach.m4 m4sh.m4
-nodist_m4sugarlib_DATA = version.m4 m4sugar.m4f m4sh.m4f
-CLEANFILES = $(nodist_m4sugarlib_DATA)
-
-# Get the release year from ../ChangeLog.
-RELEASE_YEAR = \
- `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
-
-## ------------ ##
-## version.m4. ##
-## ------------ ##
-
-# The ':;' works around a redirected compound command bash exit status bug.
-version.m4: Makefile
- :;{ \
- echo '# This file is part of -*- Autoconf -*-.' && \
- echo '# Version of Autoconf.' && \
- echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \
- echo '# Free Software Foundation, Inc.' && \
- echo &&\
- echo 'm4_define([m4_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \
- echo 'm4_define([m4_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \
- echo 'm4_define([m4_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \
- echo 'm4_define([m4_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
- echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
- echo 'm4_define([m4_PACKAGE_URL], [$(PACKAGE_URL)])' && \
- echo 'm4_define([m4_PACKAGE_YEAR], ['$(RELEASE_YEAR)'])'; \
- } > address@hidden
- mv address@hidden $@
-
-
-## --------------- ##
-## Building TAGS. ##
-## --------------- ##
-
-TAGS_FILES = $(dist_m4sugarlib_DATA)
-
-ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF)
-
-
-## -------- ##
-## Checks. ##
-## -------- ##
-
-check-local: check-forbidden-patterns
-forbidden_patterns = -e '^_*EOF' -e ' cmp '
-forbidden_patterns_files = $(dist_m4sugarlib_DATA)
-
-
-
-## ------------------ ##
-## The frozen files. ##
-## ------------------ ##
-
-m4sugar.m4f: $(m4sugar_m4f_dependencies)
-m4sh.m4f: $(m4sh_m4f_dependencies)
-include ../freeze.mk
--
1.8.3.rc0.19.g7e6a0cc
- [PATCH v2 00/17] Convert the autoconf build system to non-recursive make, (continued)
- [PATCH v2 00/17] Convert the autoconf build system to non-recursive make, Stefano Lattarini, 2013/05/06
- [PATCH v2 02/17] build: don't distribute lib/freeze.mk explicitly, Stefano Lattarini, 2013/05/06
- [PATCH v2 01/17] sync: some files from upstream, Stefano Lattarini, 2013/05/06
- [PATCH v2 05/17] build: no more recursion for 'lib/emacs' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 04/17] build: no more make recursion for 'bin' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 03/17] build: no more make recursion for 'doc' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 06/17] build: no more recursion for 'lib/autoscan' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 07/17] build: no more recursion for 'lib/autotest' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 09/17] build: no more recursion for' lib/autoconf' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 10/17] build: no more recursion for 'lib/Autom4te' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 08/17] build: no more recursion for 'lib/m4sugar' subdir,
Stefano Lattarini <=
- [PATCH v2 11/17] build: define RELEASE_YEAR with AC_SUBST, Stefano Lattarini, 2013/05/06
- [PATCH v2 13/17] build: avoid repeating the same etags args several times, Stefano Lattarini, 2013/05/06
- [PATCH v2 12/17] build: no more recursion for lib 'subdir', Stefano Lattarini, 2013/05/06
- [PATCH v2 14/17] build: fixup: don't define ETAGS_ARGS multiple times, Stefano Lattarini, 2013/05/06
- [PATCH v2 15/17] build: no more recursion for 'tests' subdir, Stefano Lattarini, 2013/05/06
- [PATCH v2 16/17] build: remove last make recursion (for subdir 'man'), Stefano Lattarini, 2013/05/06
- [PATCH v2 17/17] build: remove refs to obsolescent 'mkinstalldir' script and variable, Stefano Lattarini, 2013/05/06
- Re: [PATCH v2 00/17] Convert the autoconf build system to non-recursive make, Paul Eggert, 2013/05/06
- Re: [PATCH v2 00/17] Convert the autoconf build system to non-recursive make, Stefano Lattarini, 2013/05/07