[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 01/17] [ng] am: new private make variable $(am__all
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 01/17] [ng] am: new private make variable $(am__all_progs) |
Date: |
Tue, 22 May 2012 22:48:39 +0200 |
This is just a preparatory refactoring for future changes.
* automake.in (generate_makefile): Substitute $(am__all_progs) to the
list of all programs "seen" by automake (by looking at the PROGRAMS
primary).
* t/all-progs.sh: New test.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 3 +++
t/all-progs.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+)
create mode 100755 t/all-progs.sh
diff --git a/automake.in b/automake.in
index 7b0ac7a..2019734 100644
--- a/automake.in
+++ b/automake.in
@@ -7812,7 +7812,10 @@ sub generate_makefile ($$)
handle_subdirs;
handle_tags;
handle_minor_options;
+
# Must come after handle_programs so that %known_programs is up-to-date.
+ define_variable ('am__all_progs', join(" ", keys %known_programs),
+ INTERNAL);
handle_tests;
# This must come after most other rules.
diff --git a/t/all-progs.sh b/t/all-progs.sh
new file mode 100755
index 0000000..3b8050a
--- /dev/null
+++ b/t/all-progs.sh
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2007-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/>.
+
+# Test internal automake variable $(am__all_progs).
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_SUBST([CC], ['whocares'])
+AC_SUBST([EXEEXT], [''])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-dependencies
+
+check_PROGRAMS = p1
+check_SCRIPTS = x1
+
+EXTRA_PROGRAMS = p2
+EXTRA_SCRIPTS = x2
+
+bin_PROGRAMS = p3
+bin_SCRIPTS = x3
+
+noinst_PROGRAMS = p4
+noinst_SCRIPTS = x4
+
+mydir = $(prefix)
+my_PROGRAMS = p5
+my_SCRIPTS = x5
+
+.PHONY: debug test
+debug:
+ @echo BEG: $(am__all_progs) :END
+test: debug
+ test '$(sort $(am__all_progs))' = 'p1 p2 p3 p4 p5'
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test
+$MAKE test EXEEXT=.exe
+$MAKE test EXEEXT=.bin
+
+:
--
1.7.9.5
- [Automake-NG] [PATCH 00/17] Move almost parallel-tests processing at make runtime, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 01/17] [ng] am: new private make variable $(am__all_progs),
Stefano Lattarini <=
- [Automake-NG] [PATCH 02/17] [ng] serial-tests: simplify automake-time preprocessing, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 03/17] [ng] tests: get rid of an almost-obsolete test case (parallel-tests related), Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 04/17] [ng] am: implement $(am__tolower) and $(am__toupper), Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 05/17] [ng] refactor: make '$am_config_aux_dir' available as a make variable, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 06/17] [ng] check: move definition of console colors in its own '.am' fragment, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 07/17] [ng] check: separate serial an parallel harnesses in distinct '.am' files, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 08/17] [ng] check: warn about invalid TEST_EXTENSIONS at make runtime, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 09/17] [ng] check: unconditionally distribute test-driver, Stefano Lattarini, 2012/05/22