From: Joel Rosdahl Date: Sun, 25 Feb 2018 08:09:02 +0000 (+0100) Subject: Fix paths to bundled zlib X-Git-Tag: v3.4.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=418c419c6bcd6e43eeed2eae5b861441192ebc9e;p=thirdparty%2Fccache.git Fix paths to bundled zlib Regression from the source code rearrangement in 4aa357782e48. Also added a distcheck that verifies that “./configure --with-bundled-zlib” works. Closes #229. --- diff --git a/Makefile.in b/Makefile.in index e414e875e..b7dbd4398 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,9 +55,19 @@ ccache_sources = src/main.c $(base_sources) ccache_objs = $(ccache_sources:.c=.o) zlib_sources = \ - zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/gzclose.c zlib/gzlib.c \ - zlib/gzread.c zlib/gzwrite.c zlib/inffast.c zlib/inflate.c \ - zlib/inftrees.c zlib/trees.c zlib/zutil.c + src/zlib/adler32.c \ + src/zlib/crc32.c \ + src/zlib/deflate.c \ + src/zlib/gzclose.c \ + src/zlib/gzlib.c \ + src/zlib/gzread.c \ + src/zlib/gzwrite.c \ + src/zlib/inffast.c \ + src/zlib/inflate.c \ + src/zlib/inftrees.c \ + src/zlib/trees.c \ + src/zlib/zutil.c + zlib_objs = $(zlib_sources:.c=.o) test_suites = @test_suites@ @@ -68,7 +78,15 @@ test_objs = $(test_sources:.c=.o) all_sources = $(ccache_sources) $(test_sources) all_objs = $(ccache_objs) $(test_objs) $(zlib_objs) -files_to_clean = $(all_objs) ccache$(EXEEXT) unittest/run$(EXEEXT) *~ testdir.* +files_to_clean = \ + $(all_objs) \ + ccache$(EXEEXT) \ + src/*~ \ + src/zlib/libz.a \ + testdir.* \ + unittest/run$(EXEEXT) \ + *~ \ + files_to_distclean = Makefile config.h config.log config.status .PHONY: all @@ -92,7 +110,7 @@ conf.c: confitems_lookup.c envtoconfitems_lookup.c $(zlib_objs): CPPFLAGS += -include config.h -zlib/libz.a: $(zlib_objs) +src/zlib/libz.a: $(zlib_objs) $(AR) cr $@ $(zlib_objs) $(RANLIB) $@ diff --git a/configure.ac b/configure.ac index 26ad4bb9e..6d51bc4fd 100644 --- a/configure.ac +++ b/configure.ac @@ -120,8 +120,8 @@ fi if test x${use_bundled_zlib} = xyes; then CPPFLAGS="$CPPFLAGS -I\$(srcdir)/src/zlib" - extra_libs="zlib/libz.a" - mkdir -p zlib + extra_libs="src/zlib/libz.a" + mkdir -p src/zlib else LIBS="$LIBS -lz" fi diff --git a/dev.mk.in b/dev.mk.in index c75837efc..a28d1390b 100644 --- a/dev.mk.in +++ b/dev.mk.in @@ -130,7 +130,7 @@ $(dist_archives): $(dist_files) distcheck: $(firstword $(dist_archives)) tmpdir=$$(mktemp -d /tmp/tmp-ccache-distcheck.XXXXXX) && \ (cd $$tmpdir && \ - tar xjf $(CURDIR)/$< && \ + tar xf $(CURDIR)/$< && \ mkdir -p $(dist_dir)/build && \ cd $(dist_dir)/build && \ ../configure --prefix=$$tmpdir/root && \ @@ -138,6 +138,16 @@ distcheck: $(firstword $(dist_archives)) $(MAKE) installcheck) && \ rm -rf $$tmpdir + tmpdir=$$(mktemp -d /tmp/tmp-ccache-distcheck.XXXXXX) && \ + (cd $$tmpdir && \ + tar xf $(CURDIR)/$< && \ + mkdir -p $(dist_dir)/build && \ + cd $(dist_dir)/build && \ + ../configure --prefix=$$tmpdir/root --with-bundled-zlib && \ + $(MAKE) install && \ + $(MAKE) installcheck) && \ + rm -rf $$tmpdir + .PHONY: docs docs: $(generated_docs) diff --git a/doc/NEWS.txt b/doc/NEWS.txt index e306fb340..75324208b 100644 --- a/doc/NEWS.txt +++ b/doc/NEWS.txt @@ -12,6 +12,8 @@ Bug fixes Previously, ccache would not pick up changes to such precompiled headers, risking false positive cache hits. +- Fixed build failure when using the bundled zlib sources. + ccache 3.4.1 ------------