]> granicus.if.org Git - php/commitdiff
Use "mkdir -p" instead of "test -d || mkdir" where possible
authorSascha Schumann <sas@php.net>
Mon, 15 May 2000 16:02:43 +0000 (16:02 +0000)
committerSascha Schumann <sas@php.net>
Mon, 15 May 2000 16:02:43 +0000 (16:02 +0000)
build/rules.mk
configure.in
ext/java/Makefile.in
ext/rpc/Makefile.in
ext/rpc/java/Makefile.in
sapi/servlet/Makefile.in

index ba2782d05ac19383492d518a6b267cc23fba9438..6433867d9bff1d573ee9422271f9f0bc39b35896 100644 (file)
@@ -30,7 +30,7 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EX
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
 CCLD = $(CC)
 LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
-mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
+mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
 INSTALL = $(top_srcdir)/build/shtool install -c
 INSTALL_DATA = $(INSTALL) -m 644
 SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
index 14ce09507b5b307bc1adda40c2dfa6d611493d97..c5436536afbeac8ab1990b45d82255fa79d009ed 100644 (file)
@@ -7,13 +7,6 @@ AC_INIT(main.c)
 
 PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile) 
 
-dnl Because ``make install'' is often performed by the superuser,
-dnl we create the libs subdirectory as the user who configures PHP.
-dnl Otherwise, the current user will not be able to delete libs
-dnl or the contents of libs.
-test -d libs || mkdir libs
-rm -f libs/*
-
 if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
   AC_MSG_ERROR(--with-shared-apache is not supported. Please refer to the documentation for using APXS)
 fi
@@ -34,6 +27,14 @@ php_shtool="$srcdir/build/shtool"
 T_MD=`$php_shtool echo -n -e %B`
 T_ME=`$php_shtool echo -n -e %b`
 
+dnl Because ``make install'' is often performed by the superuser,
+dnl we create the libs subdirectory as the user who configures PHP.
+dnl Otherwise, the current user will not be able to delete libs
+dnl or the contents of libs.
+
+$php_shtool mkdir -p libs
+rm -f libs/*
+
 dnl ## Diversion 2 is the initial checking of OS features, programs,
 dnl ## libraries and so on.
 
@@ -179,7 +180,7 @@ dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
 dnl and source packages.  This should be harmless on other OSs.
 dnl
 if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
-       CFLAGS="$CFLAGS -I/usr/pkg/include"
+       CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
        LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
 fi
 
@@ -661,7 +662,7 @@ fi
 
 
 phplibdir="`pwd`/modules"
-test -d $phplibdir || mkdir $phplibdir
+$php_shtool mkdir -p $phplibdir
 phptempdir="`pwd`/libs"
 
 test "$prefix" = "NONE" && prefix="/usr/local"
index 7d8960a34f69803371aab7f80e18b2c844ddea04..2a980157d292bf6a3217edd4bf73fe07db6d2066 100644 (file)
@@ -14,8 +14,7 @@ make_shared = yes
 include $(top_srcdir)/build/dynlib.mk
 
 php_java.jar : reflect.java
-       @test -d net || mkdir net
-       @test -d net/php || mkdir net/php
+       $(mkinstalldirs) net/php
        @cp $(srcdir)/reflect.java net/php
        @echo library=php_java>net/php/reflect.properties
        javac net/php/reflect.java
index 7d8960a34f69803371aab7f80e18b2c844ddea04..2a980157d292bf6a3217edd4bf73fe07db6d2066 100644 (file)
@@ -14,8 +14,7 @@ make_shared = yes
 include $(top_srcdir)/build/dynlib.mk
 
 php_java.jar : reflect.java
-       @test -d net || mkdir net
-       @test -d net/php || mkdir net/php
+       $(mkinstalldirs) net/php
        @cp $(srcdir)/reflect.java net/php
        @echo library=php_java>net/php/reflect.properties
        javac net/php/reflect.java
index 7d8960a34f69803371aab7f80e18b2c844ddea04..2a980157d292bf6a3217edd4bf73fe07db6d2066 100644 (file)
@@ -14,8 +14,7 @@ make_shared = yes
 include $(top_srcdir)/build/dynlib.mk
 
 php_java.jar : reflect.java
-       @test -d net || mkdir net
-       @test -d net/php || mkdir net/php
+       $(mkinstalldirs) net/php
        @cp $(srcdir)/reflect.java net/php
        @echo library=php_java>net/php/reflect.properties
        javac net/php/reflect.java
index 47d0b5d2e289fc1ce1000f2fca32cac660189cb5..940866b7fcbad67ea1e592122d98dc4d33c286d3 100644 (file)
@@ -12,8 +12,7 @@ java.c : ../../ext/java/java.c
        @cp ../../ext/java/java.c .
 
 phpsrvlt.jar : servlet.java ../../ext/java/reflect.java
-       @test -d net || mkdir net
-       @test -d net/php || mkdir net/php
+       $(mkinstalldirs) net/php
        @echo library=php4>net/php/reflect.properties
        @echo library=php4>net/php/servlet.properties
        @cp formatter.java net/php