maint: list of names of built programs available in the Makefiles
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 2 Sep 2012 19:55:11 +0000 (21:55 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 5 Sep 2012 06:48:29 +0000 (08:48 +0200)
This is just a preparatory refactoring in view of future changes.

* configure.ac (AC_SUBST): New 'built_programs'.
* tests/Makefile.am (AM_TESTS_ENVIRONMENT): Simply define the exported
variable 'built_programs' to the expansion of the '$(built_programs)'
AC_SUBST'd make variable.
(.built-programs): Remove this now-unneeded convenience target.
(CLEANFILES, check_DATA): Delete, no longer needed.

configure.ac
tests/Makefile.am

index 627920d..5e8ce24 100644 (file)
@@ -462,6 +462,8 @@ AC_SUBST([pkglibexec_PROGRAMS]) AM_SUBST_NOTMAKE([pkglibexec_PROGRAMS])
 AC_SUBST([man1_MANS])           AM_SUBST_NOTMAKE([man1_MANS])
 AC_SUBST([EXTRA_MANS])          AM_SUBST_NOTMAKE([EXTRA_MANS])
 
+AC_SUBST([built_programs], [$optional_bin_progs])
+
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
 ############################################################################
index 2ef2f10..56ca499 100644 (file)
@@ -39,14 +39,6 @@ vc_exe_in_TESTS:
 check-local: vc_exe_in_TESTS
 .PHONY: vc_exe_in_TESTS
 
-CLEANFILES =
-CLEANFILES += .built-programs
-check_DATA = .built-programs
-.built-programs: $(top_srcdir)/Makefile.am
-       $(AM_V_GEN)(cd $(top_builddir)                                  \
-            && MAKEFLAGS= $(MAKE) -s built_programs.list)              \
-          | sed s,^src/,, > $@-t && mv $@-t $@
-
 TEST_EXTENSIONS = .sh .pl .xpl
 
 if HAVE_PERL
@@ -86,7 +78,7 @@ AM_TESTS_ENVIRONMENT =                                \
   abs_top_builddir='$(abs_top_builddir)'       \
   abs_top_srcdir='$(abs_top_srcdir)'           \
   abs_srcdir='$(abs_srcdir)'                   \
-  built_programs="`cat .built-programs`"       \
+  built_programs='$(built_programs)'           \
   host_os=$(host_os)                           \
   host_triplet='$(host_triplet)'               \
   srcdir='$(srcdir)'                           \