From: Joel Rosdahl Date: Sat, 20 Oct 2018 11:19:57 +0000 (+0200) Subject: Improve distcheck X-Git-Tag: v3.5.1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aecfe7caadc7d7ed622e703b44f454bec98dd2c1;p=thirdparty%2Fccache.git Improve distcheck - Build with more warnings. - Added an extra build with clang. - Build with -Werror to actually catch the errors. --- diff --git a/Makefile.in b/Makefile.in index 175e44049..2f41cb75d 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 fde4e7705..0a311fe5b 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)