]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve distcheck
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 20 Oct 2018 11:19:57 +0000 (13:19 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 24 Oct 2018 20:11:50 +0000 (22:11 +0200)
- Build with more warnings.
- Added an extra build with clang.
- Build with -Werror to actually catch the errors.

Makefile.in
dev.mk.in

index 175e440493fa1ad1cbc0515aa93583f9e8ef008f..2f41cb75d54741b037b658bbd8dbb9a5e963eec7 100644 (file)
@@ -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@
 
index fde4e77051a559aed38cb55a2853bec4c8b7efe1..0a311fe5bd9068e0b5b61b0e7cda60fda7fc8df2 100644 (file)
--- 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)