[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/16] build: no more recursion for lib/autotest subdir
From: |
Stefano Lattarini |
Subject: |
[PATCH 07/16] build: no more recursion for lib/autotest subdir |
Date: |
Sun, 5 May 2013 23:29:04 +0200 |
Signed-off-by: Stefano Lattarini <address@hidden>
---
configure.ac | 2 +-
lib/Makefile.am | 37 ++++++++++++++++++++++++++++++-------
lib/autotest/Makefile.am | 46 ----------------------------------------------
lib/freeze.mk | 3 ++-
4 files changed, 33 insertions(+), 55 deletions(-)
delete mode 100644 lib/autotest/Makefile.am
diff --git a/configure.ac b/configure.ac
index eadd366..3dac41c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,7 @@ AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
AC_CONFIG_FILES([Makefile
lib/Makefile lib/Autom4te/Makefile
lib/m4sugar/Makefile
- lib/autoconf/Makefile lib/autotest/Makefile
+ lib/autoconf/Makefile
])
AC_OUTPUT
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d376016..d28f7d7 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -15,7 +15,10 @@
# 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 = Autom4te m4sugar autoconf autotest
+## Required by rules to build autoscan and autotest libraries.
+include $(srcdir)/freeze.mk
+
+SUBDIRS = Autom4te m4sugar autoconf
nodist_pkgdata_DATA = autom4te.cfg
EXTRA_DIST = autom4te.in
@@ -63,12 +66,6 @@ EXTRA_DIST += autoscan/autoscan.pre
nodist_autoscanlib_DATA = autoscan/autoscan.list
CLEANFILES += autoscan/autoscan.list
-## autoscan.list might change when autoconf.m4f sources change.
-## Therefore we want the same dependencies as autoconf.m4f, which
-## are listed in freeze.mk. It also ensure that tests/autom4te
-## is built (we need it in the command below).
-include $(srcdir)/freeze.mk
-
autoscan/autoscan.list: $(srcdir)/autoscan/autoscan.pre
$(autoconf_m4f_dependencies) Makefile.am
$(MKDIR_P) $(@D)
echo '# Automatically Generated: do not edit this file' >$@
@@ -77,3 +74,29 @@ autoscan/autoscan.list: $(srcdir)/autoscan/autoscan.pre
$(autoconf_m4f_dependenc
sed -n '/^[^#]/p' $(srcdir)/autoscan/autoscan.pre; \
$(MY_AUTOM4TE) --cache '' -M -l autoconf -t'AN_OUTPUT:$$1: $$2
$$3' \
) | LC_ALL=C sort >>$@
+
+## ----------------------- ##
+## Make Autotest library. ##
+## ----------------------- ##
+
+autotestlibdir = $(pkgdatadir)/autotest
+
+dist_autotestlib_DATA = \
+ autotest/autotest.m4 \
+ autotest/general.m4 \
+ autotest/specific.m4
+
+nodist_autotestlib_DATA = autotest/autotest.m4f
+CLEANFILES += $(nodist_autotestlib_DATA)
+
+## Building TAGS.
+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)
+
+## The frozen files.
+autotest/autotest.m4f: $(autotest_m4f_dependencies)
diff --git a/lib/autotest/Makefile.am b/lib/autotest/Makefile.am
deleted file mode 100644
index 6784352..0000000
--- a/lib/autotest/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-# Make Autotest library.
-
-# Copyright (C) 2001-2002, 2009-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/>.
-
-autotestlibdir = $(pkgdatadir)/autotest
-dist_autotestlib_DATA = autotest.m4 general.m4 specific.m4
-nodist_autotestlib_DATA = autotest.m4f
-CLEANFILES = $(nodist_autotestlib_DATA)
-
-## --------------- ##
-## Building TAGS. ##
-## --------------- ##
-
-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)
-
-
-## ------------------ ##
-## The frozen files. ##
-## ------------------ ##
-
-autotest.m4f: $(autotest_m4f_dependencies)
-include ../freeze.mk
diff --git a/lib/freeze.mk b/lib/freeze.mk
index 8447455..a969e43 100644
--- a/lib/freeze.mk
+++ b/lib/freeze.mk
@@ -42,8 +42,9 @@ MY_AUTOM4TE =
\
# It may happen that the output does not end with an end of line, hence
# force an end of line when reporting errors.
.m4.m4f:
+ $(MKDIR_P) $(@D)
$(MY_AUTOM4TE) \
- --language=$* \
+ --language=$(*F) \
--freeze \
--output=$@
--
1.8.3.rc0.19.g7e6a0cc
- [RFC] Convert the Autoconf build system to non-recursive make, Stefano Lattarini, 2013/05/05
- [PATCH 02/16] build: don't distribute lib/freeze.mk explicitly, Stefano Lattarini, 2013/05/05
- [PATCH 03/16] build: no more make recursion for 'doc' subdir, Stefano Lattarini, 2013/05/05
- [PATCH 01/16] sync: some files from upstream, Stefano Lattarini, 2013/05/05
- [PATCH 05/16] build: no more recursion for lib/emacs subdir, Stefano Lattarini, 2013/05/05
- [PATCH 04/16] build: no more make recursion for 'bin' subdir, Stefano Lattarini, 2013/05/05
- [PATCH 06/16] build: no more recursion for lib/autoscan subdir, Stefano Lattarini, 2013/05/05
- [PATCH 07/16] build: no more recursion for lib/autotest subdir,
Stefano Lattarini <=
- [PATCH 08/16] build: no more recursion for lib/m4sugar subdir, Stefano Lattarini, 2013/05/05
- [PATCH 09/16] build: no more recursion for lib/autoconf subdir, Stefano Lattarini, 2013/05/05
- [PATCH 10/16] build: no more recursion for lib/Autom4te subdir, Stefano Lattarini, 2013/05/05
- [PATCH 11/16] build: define RELEASE_YEAR with AC_SUBST, Stefano Lattarini, 2013/05/05
- [PATCH 13/16] build: avoid repeating the same etags args several times, Stefano Lattarini, 2013/05/05
- [PATCH 14/16] build: fixup: don't define ETAGS_ARGS multiple times, Stefano Lattarini, 2013/05/05
- [PATCH 12/16] build: no more recursion for lib subdir, Stefano Lattarini, 2013/05/05
- [PATCH 16/16] build: remove last make recursion (for subdir 'man'), Stefano Lattarini, 2013/05/05
- [PATCH 15/16] build: no more recursion for tests subdir, Stefano Lattarini, 2013/05/05
- Re: [RFC] Convert the Autoconf build system to non-recursive make, Paul Eggert, 2013/05/05