From 5f674757fc35708f7d1700a9fc37a7b77a1bf1ab Mon Sep 17 00:00:00 2001 From: Victor Westerhuis Date: Fri, 3 Dec 2021 23:33:32 +0100 Subject: Only build tests when running check Change noinst_ targets to check_. Also move from BUILT_SOURCES to explicit dependencies to prevent running colm when not running tests. --- test/Makefile.am | 2 +- test/aapl.d/Makefile.am | 8 +++----- test/colm.d/Makefile.am | 6 ++---- test/rlhc.d/Makefile.am | 6 ++---- test/rlparse.d/Makefile.am | 11 +++++------ test/trans.d/Makefile.am | 8 ++------ 6 files changed, 15 insertions(+), 26 deletions(-) (limited to 'test') diff --git a/test/Makefile.am b/test/Makefile.am index 4b6bba61..f583ed05 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = . aapl.d colm.d rlhc.d rlparse.d trans.d -noinst_SCRIPTS = subject.mk subject.sh +check_SCRIPTS = subject.mk subject.sh pkgdata_DATA = runtests diff --git a/test/aapl.d/Makefile.am b/test/aapl.d/Makefile.am index 4aade8ff..dd59b706 100644 --- a/test/aapl.d/Makefile.am +++ b/test/aapl.d/Makefile.am @@ -4,7 +4,7 @@ CPPFLAGS = @SUBJ_AAPL_CPPFLAGS@ -noinst_PROGRAMS = \ +check_PROGRAMS = \ stress_avltree stress_avliter stress_avlmel \ stress_avlmelkey stress_avlitree stress_avlmap \ stress_avlset stress_avlimel stress_avlimelkey \ @@ -19,7 +19,7 @@ noinst_PROGRAMS = \ test_avlikeyless test_compare test_string \ test_rope -noinst_SCRIPTS = gentests +check_SCRIPTS = gentests stress_avltree_SOURCES = stress_avltree.cpp util.cpp stress_avliter_SOURCES = stress_avliter.cpp util.cpp @@ -104,10 +104,8 @@ gentests: gentests.sh Makefile clean-local: rm -Rf working *.exp -all-local: +check-local: if test '$(builddir)' != '$(srcdir)'; then \ $(LN_S) -f '$(srcdir)/'*.exp '$(builddir)'; \ fi - -check-local: '$(top_srcdir)/test/runtests' diff --git a/test/colm.d/Makefile.am b/test/colm.d/Makefile.am index a728facb..8a752e63 100644 --- a/test/colm.d/Makefile.am +++ b/test/colm.d/Makefile.am @@ -1,4 +1,4 @@ -noinst_SCRIPTS = gentests +check_SCRIPTS = gentests EXTRA_DIST = \ gentests.sh \ @@ -188,10 +188,8 @@ gentests: gentests.sh Makefile clean-local: rm -Rf working *.lm *.lmi *.in -all-local: +check-local: if test '$(builddir)' != '$(srcdir)'; then \ $(LN_S) -f '$(srcdir)/'*.lm '$(srcdir)/'*.lmi '$(srcdir)/'*.in '$(builddir)'; \ fi - -check-local: '$(top_srcdir)/test/runtests' diff --git a/test/rlhc.d/Makefile.am b/test/rlhc.d/Makefile.am index 4c8e841d..59999192 100644 --- a/test/rlhc.d/Makefile.am +++ b/test/rlhc.d/Makefile.am @@ -16,7 +16,7 @@ RLHC_DEP = \ EXTRA_DIST = gentests rlhc.lm $(RLHC_DEP) $(CASES) -noinst_PROGRAMS = rlhc +check_PROGRAMS = rlhc rlhc$(EXEEXT): rlhc.lm $(RLHC_DEP) $(COLM_BIN) $(COLM_BIN) -B '$(top_builddir)' -b rlhc_object -o $@ -I$(srcdir) $< @@ -1094,10 +1094,8 @@ CLEANFILES = gentests clean-local: rm -Rf working case -all-local: +check-local: if test '$(builddir)' != '$(srcdir)'; then \ $(LN_S) -f '$(srcdir)/gentests' '$(srcdir)/case' '$(builddir)'; \ fi - -check-local: '$(top_srcdir)/test/runtests' diff --git a/test/rlparse.d/Makefile.am b/test/rlparse.d/Makefile.am index 479332ef..e5151418 100644 --- a/test/rlparse.d/Makefile.am +++ b/test/rlparse.d/Makefile.am @@ -2,7 +2,7 @@ COLM_BIN = ../../src/colm COLM_xCPPFLAGS = -I../../src/include COLM_xLDADD = ../../src/libcolm.la -noinst_PROGRAMS = rlparse +check_PROGRAMS = rlparse rlparse_SOURCES = parse.c if.h if.cc commit.cc \ actparams.cc parsetree.cc parsedata.cc \ @@ -31,8 +31,6 @@ EXTRA_DIST = \ case/rlparse.h case/rlscan.rl \ case/rlscan--colm-frontend.exp case/rlscan--reduce-frontend.exp -BUILT_SOURCES = parse.c if.h if.cc commit.cc - parse.c: rlparse.lm reducer.lm $(RAGEL_LM) $(COLM_BIN) $(COLM_BIN) -c -b rlparse_object -o $@ -e if.h -x if.cc -m commit.cc -I$(srcdir) $< @@ -40,16 +38,17 @@ if.h: parse.c if.cc: parse.c commit.cc: parse.c +load.cc: if.h +reducer.cc: if.h + CLEANFILES = gentests clean-local: rm -Rf working case -all-local: +check-local: if test '$(builddir)' != '$(srcdir)'; then \ $(LN_S) -f '$(srcdir)/gentests' '$(builddir)'; \ cp -pR -f '$(srcdir)/case' '$(builddir)'; \ fi - -check-local: '$(top_srcdir)/test/runtests' diff --git a/test/trans.d/Makefile.am b/test/trans.d/Makefile.am index 30b53ff1..5b0a91e7 100644 --- a/test/trans.d/Makefile.am +++ b/test/trans.d/Makefile.am @@ -3,9 +3,7 @@ COLM_BIN = ../../src/colm COLM_xCPPFLAGS = -I../../src/include COLM_xLDADD = ../../src/libcolm.la -noinst_PROGRAMS = trans - -BUILT_SOURCES = trans.c +check_PROGRAMS = trans EXTRA_DIST = \ gentests \ @@ -383,10 +381,8 @@ CLEANFILES = gentests clean-local: rm -Rf working case -all-local: +check-local: if test '$(builddir)' != '$(srcdir)'; then \ $(LN_S) -f '$(srcdir)/gentests' '$(srcdir)/case' '$(builddir)'; \ fi - -check-local: '$(top_srcdir)/test/runtests' -- cgit v1.2.1