diff options
author | Craig Small <csmall@dropbear.xyz> | 2020-10-19 20:05:41 +1100 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2020-10-19 20:05:41 +1100 |
commit | 6a2cc67bb62de319aec8db9a4d0a83595bb4dcf8 (patch) | |
tree | f5595b8836d992473ffb75702632c1d35a9c6d74 /Makefile.am | |
parent | fb910011929a4c0feab413d25a5b06440b6ff140 (diff) | |
download | procps-ng-6a2cc67bb62de319aec8db9a4d0a83595bb4dcf8.tar.gz |
build-sys: Build check programs only on make check
noinst_PROGRAMS are built with "make" even though we had the
test programs in there and only needed them for "make check".
In theory the check target should depend on check_PROGRAMS as
check-am target does and the document states it should, but for
reasons understood by the automake whisperers only, it doesn't
build them.
check only depends on BUILT_SOURCES for some reason.
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
References:
https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 5f2e026..6007268 100644 --- a/Makefile.am +++ b/Makefile.am @@ -312,7 +312,7 @@ ps_pscommand_SOURCES = \ # Test programs required for dejagnu or standalone testing -noinst_PROGRAMS = \ +check_PROGRAMS = \ lib/test_strutils \ lib/test_fileutils \ lib/test_process \ @@ -327,7 +327,7 @@ lib_test_process_LDADD = $(CYGWINFLAGS) lib_test_strtod_nol_SOURCES = lib/test_strtod_nol.c lib/strutils.c lib_test_strtod_nol_LDADD = $(CYGWINFLAGS) -noinst_PROGRAMS += \ +check_PROGRAMS += \ proc/test_Itemtables \ proc/test_pids \ proc/test_uptime \ @@ -386,7 +386,8 @@ TESTS = \ lib/test_fileutils \ lib/test_strtod_nol -check_PROGRAMS = $(TESTS) +# Automake should do this, but it doesn't +check: $(check_PROGRAMS) $(top_srcdir)/.version: touch $(top_srcdir)/.version |