summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-04-30 03:10:34 +0000
committerSascha Schumann <sas@php.net>2000-04-30 03:10:34 +0000
commit8d19edc4953cbec69bbdca2f310d7d8d22be7494 (patch)
tree14987a28d285a2204ef7fbc9b37a3181d7badfc5
parentbe00d130e6006c121c0a2461946b4e02e9a9e30b (diff)
downloadphp-git-8d19edc4953cbec69bbdca2f310d7d8d22be7494.tar.gz
Overall UNIX build system improvements:
* Makefile header is now completely dynamic * Absolute paths in (top_)?(src|build)dir and VPATH (fixes Tru64 support) * VPATH does not contain variables anymore (fixes UnixWare support)
-rw-r--r--Makefile.in11
-rw-r--r--NEWS1
-rwxr-xr-xbuild/fastgen.sh32
-rw-r--r--build/ltlib.mk4
-rw-r--r--build/rules.mk6
-rw-r--r--build/rules_pear.mk6
-rw-r--r--ext/Makefile.in7
-rwxr-xr-xext/ext_skel7
8 files changed, 32 insertions, 42 deletions
diff --git a/Makefile.in b/Makefile.in
index b580462243..705479e397 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,4 @@
-DEPTH = .
-topsrcdir = @topsrcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
ZEND_DIR = $(srcdir)/Zend
SUBDIRS = Zend ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
@@ -36,9 +31,9 @@ targets = $(LTLIBRARY_NAME) $(PROGRAM_NAME)
install_targets = install-local install-modules
-include $(topsrcdir)/build/rules.mk
-include $(topsrcdir)/build/library.mk
-include $(topsrcdir)/build/program.mk
+include $(top_srcdir)/build/rules.mk
+include $(top_srcdir)/build/library.mk
+include $(top_srcdir)/build/program.mk
install-local:
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
diff --git a/NEWS b/NEWS
index 1fa1cbe044..e878e7904f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.0 Release
+- Improved UNIX build system to support more vendor make tools (Sascha)
- Updated natural comparison/sorting algorithm by Martin Pool
<mbp@humbug.org.au>. (Andrei)
- Fixed a crash in array_multisort() that happened when empty arrays
diff --git a/build/fastgen.sh b/build/fastgen.sh
index 40ab4e149f..9261e1a9a6 100755
--- a/build/fastgen.sh
+++ b/build/fastgen.sh
@@ -23,29 +23,37 @@
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
-# $Id: fastgen.sh,v 1.2 2000-01-01 20:48:42 sas Exp $
+# $Id: fastgen.sh,v 1.3 2000-04-30 03:10:34 sas Exp $
#
srcdir=$1
shift
-topsrcdir=`(cd $srcdir; pwd)`
-
mkdir_p=$1
shift
+top_srcdir=`(cd $srcdir; pwd)`
+top_builddir=`pwd`
+
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
- mkdir_p="$topsrcdir/build/shtool mkdir -f -p"
+ mkdir_p="$top_srcdir/helpers/mkdir.sh"
fi
-for i in $@ ; do
- echo "creating $i"
- dir=`dirname $i`
- $mkdir_p $dir
- sed \
- -e s#@topsrcdir@#$topsrcdir# \
- -e s#@srcdir@#$topsrcdir/$dir# \
- < $topsrcdir/$i.in > $i
+for makefile in $@; do
+ echo "creating $makefile"
+# portable dirname
+ dir=`echo $makefile|sed 's%[^/][^/]*$%%'`
+ test -d "$dir/" || $mkdir_p "$dir/"
+
+ (cat <<EOF
+top_srcdir = $top_srcdir
+top_builddir = $top_builddir
+srcdir = $top_srcdir/$dir
+builddir = $top_builddir/$dir
+VPATH = $top_srcdir/$dir
+EOF
+)| cat - $top_srcdir/$makefile.in > $makefile
+
done
diff --git a/build/ltlib.mk b/build/ltlib.mk
index 1474621afa..9538be9c5a 100644
--- a/build/ltlib.mk
+++ b/build/ltlib.mk
@@ -26,6 +26,6 @@
targets = $(LTLIBRARY_NAME)
-include $(topsrcdir)/build/rules.mk
-include $(topsrcdir)/build/library.mk
+include $(top_srcdir)/build/rules.mk
+include $(top_srcdir)/build/library.mk
diff --git a/build/rules.mk b/build/rules.mk
index 1a2c117706..e034caaaf7 100644
--- a/build/rules.mk
+++ b/build/rules.mk
@@ -24,7 +24,7 @@
# $Id$
#
-include $(DEPTH)/config_vars.mk
+include $(top_builddir)/config_vars.mk
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
@@ -34,11 +34,9 @@ mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
-DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(DEPTH)
+DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)
moduledir = $(libdir)/php/modules
-top_srcdir = $(topsrcdir)
-top_builddir = $(DEPTH)
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s .y .l
diff --git a/build/rules_pear.mk b/build/rules_pear.mk
index cfd61cbc1b..a00d075da2 100644
--- a/build/rules_pear.mk
+++ b/build/rules_pear.mk
@@ -24,7 +24,7 @@
# $Id$
#
-include $(DEPTH)/config_vars.mk
+include $(top_builddir)/config_vars.mk
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
@@ -34,11 +34,9 @@ mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
-DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(DEPTH)
+DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)
moduledir = $(libdir)/php/modules
-top_srcdir = $(topsrcdir)
-top_builddir = $(DEPTH)
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s .y .l
diff --git a/ext/Makefile.in b/ext/Makefile.in
index 4f3ead03f9..d490f0116f 100644
--- a/ext/Makefile.in
+++ b/ext/Makefile.in
@@ -1,9 +1,4 @@
-DEPTH = ..
-topsrcdir = @topsrcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
SUBDIRS = $(EXT_STATIC) $(EXT_SHARED)
all:
@@ -18,4 +13,4 @@ all:
NO_RECURSION = all
-include $(topsrcdir)/build/rules.mk
+include $(top_srcdir)/build/rules.mk
diff --git a/ext/ext_skel b/ext/ext_skel
index 7e5fb40501..3db7ebae57 100755
--- a/ext/ext_skel
+++ b/ext/ext_skel
@@ -64,15 +64,10 @@ $ECHO_N " Makefile.in$ECHO_C"
cat >Makefile.in <<eof
# \$Id\$
-DEPTH = ../..
-topsrcdir = @topsrcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
LTLIBRARY_NAME = lib$extname.la
LTLIBRARY_SOURCES = $extname.c
-include \$(topsrcdir)/build/ltlib.mk
+include \$(top_srcdir)/build/ltlib.mk
eof