]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix paths to bundled zlib
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 25 Feb 2018 08:09:02 +0000 (09:09 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 25 Feb 2018 08:13:33 +0000 (09:13 +0100)
Regression from the source code rearrangement in 4aa357782e48.

Also added a distcheck that verifies that “./configure
--with-bundled-zlib” works.

Closes #229.

Makefile.in
configure.ac
dev.mk.in
doc/NEWS.txt

index e414e875e9e0de2ebb8a021251e2bf1bf036324a..b7dbd43989f772b84220f442de1ece8343141304 100644 (file)
@@ -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) $@
 
index 26ad4bb9ebd303258b6bb55e22631092e659e6a1..6d51bc4fdf2c80274c7c766d00599ffbd1bbf126 100644 (file)
@@ -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
index c75837efc3e848a5ff8dadabc820dc4da2f26365..a28d1390b24095cb0922e095b108a5376303a990 100644 (file)
--- 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)
 
index e306fb34061448919363cb1b86295ebb6a1af32d..75324208b4d4a4c030880cee165c7ecc353e4dde 100644 (file)
@@ -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
 ------------