Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For the buildsystem now only .d files that exist are included #4026

Merged
merged 2 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ endif
DEPFILES = $(patsubst %,gen/deps/%.d,$(SOURCES))

# Include the dependency tracking files, skip any missing ones
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the comment already that we "skip any missing ones", but that wasn't true anymore with my previous refactoring of the buildsystem; this PR restores the behavior described in the comment

-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
Expand Down
30 changes: 30 additions & 0 deletions etc/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down