[PATCH] Configure: call "make distclean" for zlib only if Makefile exists

Piotr Sikora piotr at cloudflare.com
Wed Apr 23 21:32:18 UTC 2014


# HG changeset patch
# User Piotr Sikora <piotr at cloudflare.com>
# Date 1398288630 25200
#      Wed Apr 23 14:30:30 2014 -0700
# Node ID c4c006176ad05e498bdbddb8db41ce33733afedc
# Parent  cac82b9b3499922de352627ccd7f10f6dac66586
Configure: call "make distclean" for zlib only if Makefile exists.

This change allows to build nginx against git checkout of zlib.

Signed-off-by: Piotr Sikora <piotr at cloudflare.com>

diff -r cac82b9b3499 -r c4c006176ad0 auto/lib/zlib/make
--- a/auto/lib/zlib/make	Wed Apr 23 20:31:31 2014 +0400
+++ b/auto/lib/zlib/make	Wed Apr 23 14:30:30 2014 -0700
@@ -52,7 +52,7 @@ END
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) distclean \\
+	&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
 	&& \$(MAKE) -f win32/Makefile.gcc \\
 		CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
 		libz.a
@@ -75,7 +75,7 @@ END
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) distclean \\
+	&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
 	&& cp contrib/asm586/match.S . \\
 	&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
 		./configure \\
@@ -92,7 +92,7 @@ END
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) distclean \\
+	&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
 	&& cp contrib/asm686/match.S . \\
 	&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
 		./configure \\
@@ -125,7 +125,7 @@ if [ $done = NO ]; then
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) distclean \\
+	&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
 	&& CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
 		./configure \\
 	&& \$(MAKE) libz.a



More information about the nginx-devel mailing list