summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-15 16:02:43 +0000
committerSascha Schumann <sas@php.net>2000-05-15 16:02:43 +0000
commit8ab33a4d13a69285c6c2853444fb56f8de82ba82 (patch)
tree4fb320f0baf7173448327070a030c2ea9665067c
parent521e1d218ce05920e992cfb0e042cb1e8851a1cd (diff)
downloadphp-git-8ab33a4d13a69285c6c2853444fb56f8de82ba82.tar.gz
Use "mkdir -p" instead of "test -d || mkdir" where possible
-rw-r--r--build/rules.mk2
-rw-r--r--configure.in19
-rw-r--r--ext/java/Makefile.in3
-rw-r--r--ext/rpc/Makefile.in3
-rw-r--r--ext/rpc/java/Makefile.in3
-rw-r--r--sapi/servlet/Makefile.in3
6 files changed, 15 insertions, 18 deletions
diff --git a/build/rules.mk b/build/rules.mk
index ba2782d05a..6433867d9b 100644
--- a/build/rules.mk
+++ b/build/rules.mk
@@ -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 $@
diff --git a/configure.in b/configure.in
index 14ce09507b..c5436536af 100644
--- a/configure.in
+++ b/configure.in
@@ -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"
diff --git a/ext/java/Makefile.in b/ext/java/Makefile.in
index 7d8960a34f..2a980157d2 100644
--- a/ext/java/Makefile.in
+++ b/ext/java/Makefile.in
@@ -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
diff --git a/ext/rpc/Makefile.in b/ext/rpc/Makefile.in
index 7d8960a34f..2a980157d2 100644
--- a/ext/rpc/Makefile.in
+++ b/ext/rpc/Makefile.in
@@ -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
diff --git a/ext/rpc/java/Makefile.in b/ext/rpc/java/Makefile.in
index 7d8960a34f..2a980157d2 100644
--- a/ext/rpc/java/Makefile.in
+++ b/ext/rpc/java/Makefile.in
@@ -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
diff --git a/sapi/servlet/Makefile.in b/sapi/servlet/Makefile.in
index 47d0b5d2e2..940866b7fc 100644
--- a/sapi/servlet/Makefile.in
+++ b/sapi/servlet/Makefile.in
@@ -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