]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove unnecessary dependencies from distclean and inline them instead and test if...
authorMika Lindqvist <postmaster@raasu.org>
Wed, 6 May 2015 23:54:42 +0000 (02:54 +0300)
committerMika Lindqvist <postmaster@raasu.org>
Thu, 7 May 2015 10:00:24 +0000 (13:00 +0300)
Makefile.in

index 33b353e30d499378476c32e0394d772da8ae2ab7..686d913b10bf31cdac29a4a0b353e8558b252b17 100644 (file)
@@ -253,7 +253,7 @@ clean:
        rm -f a.out
 
 maintainer-clean: distclean
-distclean: clean zconf zconf.h.cmakein
+distclean: clean
        @if [ -f $(ARCHDIR)/Makefile ]; then $(MAKE) -C $(ARCHDIR) distclean; fi
        rm -f zlib.pc configure.log
        -@rm -f .DS_Store
@@ -262,6 +262,14 @@ distclean: clean zconf zconf.h.cmakein
        printf 'all:\n\t-@echo "Please use ./configure first.  Thank you."\n' > Makefile ; \
        printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \
        touch -r $(SRCDIR)/Makefile.in Makefile ; fi
+# Reset zconf.h and zconf.h.cmakein if building inside source tree
+       @if [ -f zconf.h.in ]; then \
+       cp -p $(SRCDIR)/zconf.h.in zconf.h ; \
+       TEMPFILE=zconfh_$$ ; \
+       echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\
+       sed -f $$TEMPFILE $(SRCDIR)/zconf.h.in > zconf.h.cmakein &&\
+       touch -r $(SRCDIR)/zconf.h.in zconf.h.cmakein &&\
+       rm $$TEMPFILE ; fi
 # Cleanup these files if building outside source tree
        @if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf Makefile zconf.h zconf.h.cmakein ; fi
 # Remove arch directory if building outside source tree