summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2018-10-20 13:19:57 +0200
committerJoel Rosdahl <joel@rosdahl.net>2018-10-24 22:11:50 +0200
commitaecfe7caadc7d7ed622e703b44f454bec98dd2c1 (patch)
treec3a66ca3c3f781577953ddfd2303d623193647c1
parent21ded3ae71eb2848e381d18424216149e00f9068 (diff)
downloadccache-aecfe7caadc7d7ed622e703b44f454bec98dd2c1.tar.gz
Improve distcheck
- Build with more warnings. - Added an extra build with clang. - Build with -Werror to actually catch the errors.
-rw-r--r--Makefile.in1
-rw-r--r--dev.mk.in26
2 files changed, 11 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in
index 175e4404..2f41cb75 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -122,6 +122,7 @@ clean:
conf.c: confitems_lookup.c envtoconfitems_lookup.c
+src/snprintf.o: CFLAGS += @no_implicit_fallthrough_warning@
$(zlib_objs): CPPFLAGS += -include config.h
$(zlib_objs): CFLAGS += @no_implicit_fallthrough_warning@
diff --git a/dev.mk.in b/dev.mk.in
index fde4e770..0a311fe5 100644
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -136,8 +136,8 @@ $(dist_archives): $(dist_files)
tar -c $$tarcompression -f $(CURDIR)/$@ $(dist_dir)) && \
rm -rf $$tmpdir
-.PHONY: distcheck
-distcheck: $(firstword $(dist_archives))
+# $(1): extra configure options
+define do_distcheck
tmpdir=$$(mktemp -d /tmp/tmp-ccache-distcheck.XXXXXX) && \
(cd $$tmpdir && \
tar xf $(CURDIR)/$< && \
@@ -145,24 +145,18 @@ distcheck: $(firstword $(dist_archives))
chmod -R a-w $(dist_dir) && \
chmod u+w $(dist_dir)/build && \
cd $(dist_dir)/build && \
- ../configure --prefix=$$tmpdir/root && \
- $(MAKE) install && \
+ ../configure --enable-more-warnings --prefix=$$tmpdir/root $(1) && \
+ $(MAKE) install CFLAGS=-Werror V=1 && \
$(MAKE) installcheck) && \
chmod -R u+w $$tmpdir/$(dist_dir) && \
rm -rf $$tmpdir
+endef
- tmpdir=$$(mktemp -d /tmp/tmp-ccache-distcheck.XXXXXX) && \
- (cd $$tmpdir && \
- tar xf $(CURDIR)/$< && \
- mkdir -p $(dist_dir)/build && \
- chmod -R a-w $(dist_dir) && \
- chmod u+w $(dist_dir)/build && \
- cd $(dist_dir)/build && \
- ../configure --prefix=$$tmpdir/root --with-bundled-zlib && \
- $(MAKE) install && \
- $(MAKE) installcheck) && \
- chmod -R u+w $$tmpdir/$(dist_dir) && \
- rm -rf $$tmpdir
+.PHONY: distcheck
+distcheck: $(firstword $(dist_archives))
+ $(call do_distcheck, --without-bundled-zlib)
+ $(call do_distcheck, --with-bundled-zlib)
+ $(call do_distcheck, CC=clang)
.PHONY: docs
docs: $(generated_docs)