From 23a9b93e773daaa0546b08e5d339399b23027360 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 13 May 2020 11:57:20 +0200 Subject: [PATCH 1/2] buildsys: only include .d files that exist Fixes #4025 --- Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.rules b/Makefile.rules index f991bd89ac..0abff033c3 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -290,7 +290,7 @@ endif DEPFILES = $(patsubst %,gen/deps/%.d,$(SOURCES)) # Include the dependency tracking files, skip any missing ones --include $(DEPFILES) +-include $(wildcard $(DEPFILES)) # the name of the .d and .lo file generated by one of our compiler # rules; you may wonder why we don't just use $@ here: this is needed From 2417390ed142f89bd0e0437a303fcb2bf151325e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 14 May 2020 00:52:12 +0200 Subject: [PATCH 2/2] Add some buildsystem tests to Travis --- .travis.yml | 4 ++-- etc/ci.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b140878269..c9b482af51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -130,7 +130,7 @@ matrix: # # Also change the compiler to GCC 4.7, to ensure we stay compatible # with that older version. - - env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=64 BUILDDIR=build CONFIGFLAGS="--enable-valgrind CC=gcc-4.7 CXX=g++-4.7" + - env: TEST_SUITES="docomp testbuildsys testinstall" NO_COVERAGE=1 ABI=64 BUILDDIR=build CONFIGFLAGS="--enable-valgrind CC=gcc-4.7 CXX=g++-4.7" addons: apt_packages: - gcc-4.7 @@ -139,7 +139,7 @@ matrix: # same as above, but in 32 bit mode, also turn off debugging (see elsewhere in this file for # an explanation). - - env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=32 BUILDDIR=build CONFIGFLAGS="" + - env: TEST_SUITES="docomp testbuildsys testinstall" NO_COVERAGE=1 ABI=32 BUILDDIR=build CONFIGFLAGS="" addons: apt_packages: - gcc-multilib diff --git a/etc/ci.sh b/etc/ci.sh index b6479fc2cb..afd05df713 100644 --- a/etc/ci.sh +++ b/etc/ci.sh @@ -125,6 +125,36 @@ GAPInput git diff --exit-code -- src ;; + testbuildsys) + # this test assumes we are doing an out-of-tree build + test $BUILDDIR != $SRCDIR + + # test: create garbage *.d and *.lo files in the source dir; these should not + # affect the out of tree build, nor should they be removed by `make clean` + mkdir -p $SRCDIR/gen/deps/src + mkdir -p $SRCDIR/gen/obj/src + echo "garbage content !!!" > $SRCDIR/gen/deps/src/bool.c.d + echo "garbage content !!!" > $SRCDIR/gen/obj/src/bool.c.lo + + # test: `make clean` works and afterwards we can still `make` + make clean + make + + # verify our "garbage" files are still there + test -f $SRCDIR/gen/deps/src/bool.c.d + test -f $SRCDIR/gen/obj/src/bool.c.lo + + # test: `make` should regenerate removed *.d files (and then also regenerate the + # corresponding *.lo file, which we verify by overwriting it with garbage) + rm gen/deps/src/bool.c.d + echo "garbage content !!!" > gen/obj/src/bool.c.lo + make + test -f gen/deps/src/bool.c.d + + # test: running `make` a second time should produce no output + test -z "$(make)" + ;; + makemanuals) make doc make check-manuals