cvs: /php4/build rules_pear.mk /php4/pear Makefile.in pear.m4 phpize.in
| From: | Sascha Schumann | Date: | Tue, 02 May 2000 20:10:47 +0000 |
| Subject: | cvs: /php4/build rules_pear.mk /php4/pear Makefile.in pear.m4 phpize.in | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14374@lists.php.net to get a copy of this message | ||
sas Tue May 2 13:10:47 2000 EDT
Modified files:
/php4/build rules_pear.mk
/php4/pear Makefile.in pear.m4 phpize.in
Log:
Fix building external extensions.
Index: php4/build/rules_pear.mk
diff -u php4/build/rules_pear.mk:1.5 php4/build/rules_pear.mk:1.6
--- php4/build/rules_pear.mk:1.5 Sat Apr 29 20:10:34 2000
+++ php4/build/rules_pear.mk Tue May 2 13:10:46 2000
@@ -21,7 +21,7 @@
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
-# $Id: rules_pear.mk,v 1.5 2000/04/30 03:10:34 sas Exp $
+# $Id: rules_pear.mk,v 1.6 2000/05/02 20:10:46 sas Exp $
#
include $(top_builddir)/config_vars.mk
@@ -33,13 +33,13 @@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -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 $@
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)
-moduledir = $(libdir)/php/modules
+moduledir = $(EXTENSION_DIR)
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s .y .l
+.SUFFIXES: .slo .c .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
@@ -47,17 +47,14 @@
.s.o:
$(COMPILE) -c $<
-.S.o:
- $(COMPILE) -c $<
-
.c.lo:
$(PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
-.S.lo:
- $(PHP_COMPILE)
+.c.slo:
+ $(SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
@@ -67,45 +64,38 @@
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-
-#################################
-# Simplified Makefile
-
-all: shared
-install: shared install-modules
-#################################
+install_targets = install-modules
-#all: all-recursive
+all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=
echo $@|sed s/-recursive//; \
- if test '$(NO_RECURSION)' != "$$otarget"; then \
- list='$(SUBDIRS)'; for i in $$list; do \
- target="$$otarget"; \
- echo "Making $$target in $$i"; \
- if test "$$i" = "."; then \
- ok=yes; \
- target="$$target-p"; \
- fi; \
- (cd $$i && $(MAKE) $$target) || exit 1; \
- done; \
- test "$otarget" = "all" && test -z '$(targets)' &&
ok=yes; \
- test "$ok" = "yes" || $(MAKE) "$$otarget-p" || exit 1; \
- fi;
+ list='$(SUBDIRS)'; for i in $$list; do \
+ target="$$otarget"; \
+ echo "Making $$target in $$i"; \
+ if test "$$i" = "."; then \
+ ok=yes; \
+ target="$$target-p"; \
+ fi; \
+ if test ! -f $$i/.deps; then touch $$i/.deps; fi; \
+ (cd $$i && $(MAKE) $$target) || exit 1; \
+ done; \
+ if test "$$otarget" = "all" && test -z '$(targets)'; then
ok=yes; fi; \
+ if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
- test "echo *.c" = '*.c' || perl $(top_srcdir)/build/mkdep.perl
$(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
+ test "echo *.c" = '*.c' || perl $(top_srcdir)/build/mkdep.perl
$(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
clean: clean-recursive clean-x
clean-x:
- rm -f $(targets) *.lo *.la *.o $(CLEANFILES)
+ rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
@@ -119,7 +109,7 @@
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
-include $(srcdir)/.deps
+include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
Index: php4/pear/Makefile.in
diff -u php4/pear/Makefile.in:1.17 php4/pear/Makefile.in:1.18
--- php4/pear/Makefile.in:1.17 Mon May 1 15:38:36 2000
+++ php4/pear/Makefile.in Tue May 2 13:10:46 2000
@@ -32,6 +32,7 @@
build/rules_pear.mk \
build/dynlib.mk \
build/shtool \
+ dynlib.m4 \
acinclude.m4
install-build:
@@ -52,27 +53,8 @@
mv $(bindir)/php-config.tmp $(bindir)/php-config && \
cp $(srcdir)/phpextdist $(bindir)/phpextdist
-SRC_HEADERS = \
- php.h \
- php_regex.h \
- php3_compat.h \
- safe_mode.h \
- fopen-wrappers.h \
- php_version.h \
- php_globals.h \
- php_reentrancy.h \
- php_ini.h \
- SAPI.h
-
-BUILD_HEADERS = \
- php_config.h \
- Zend/zend_config.h \
- build-defs.h
-
-STANDARD_HEADERS = \
- php_output.h
-
HEADER_DIRS = \
+ / \
Zend \
TSRM \
ext/standard \
@@ -84,9 +66,7 @@
done; \
$(mkinstalldirs) $$paths && \
echo "creating header file hierarchy" && \
- (cd $(top_srcdir) && cp $(SRC_HEADERS) $(phpincludedir)) && \
- (cd $(top_srcdir)/ext/standard && cp *.h $(phpincludedir)/ext/standard) && \
- (cd $(top_srcdir) && cp regex/regex.h regex/regex_extra.h $(phpincludedir)/regex)
&& \
- (cd $(top_srcdir) && cp TSRM/TSRM.h $(phpincludedir)/TSRM) && \
- (cd $(top_srcdir)/Zend && cp *.h $(phpincludedir)/Zend) && \
- (cd $(top_builddir) && cp $(BUILD_HEADERS) $(phpincludedir))
+ for i in $(HEADER_DIRS); do \
+ cd $(top_srcdir)/$$i && cp -p *.h $(phpincludedir)/$$i; \
+ cd $(top_builddir)/$$i && cp -p *.h $(phpincludedir)/$$i; \
+ done
Index: php4/pear/pear.m4
diff -u php4/pear/pear.m4:1.1 php4/pear/pear.m4:1.2
--- php4/pear/pear.m4:1.1 Wed Dec 29 18:59:34 1999
+++ php4/pear/pear.m4 Tue May 2 13:10:46 2000
@@ -37,13 +37,15 @@
AC_PROG_LIBTOOL
-SHLIBTOOL='$(LIBTOOL)'
+SHARED_LIBTOOL='$(LIBTOOL)'
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
phplibdir="pwd/modules"
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
+EXTENSION_DIR="$prefix/lib/php/modules"
+
PHP_SUBST(prefix)
PHP_SUBST(exec_prefix)
PHP_SUBST(libdir)
@@ -57,19 +59,22 @@
PHP_SUBST(CPPFLAGS)
PHP_SUBST(CXX)
PHP_SUBST(DEFS)
+PHP_SUBST(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST(LEX)
PHP_SUBST(LEX_OUTPUT_ROOT)
PHP_SUBST(LFLAGS)
-PHP_SUBST(SHLIBTOOL)
+PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(LIBTOOL)
PHP_SUBST(SHELL)
PHP_FAST_OUTPUT(Makefile)
PHP_FAST_GENERATE
+
+test -d modules || mkdir modules
AC_CONFIG_HEADER(php_config.h)
Index: php4/pear/phpize.in
diff -u php4/pear/phpize.in:1.1 php4/pear/phpize.in:1.2
--- php4/pear/phpize.in:1.1 Wed Dec 29 18:59:34 1999
+++ php4/pear/phpize.in Tue May 2 13:10:46 2000
@@ -1,24 +1,29 @@
#! /bin/sh
prefix='@PREFIX@'
-
phpdir="$prefix/lib/php/build"
+builddir="pwd"
+FILES_BUILD="dynlib.mk fastgen.sh library.mk ltlib.mk program.mk rules.mk rules_pear.mk
shtool"
+FILES="acinclude.m4 dynlib.m4"
+
+if test ! -r config.m4; then
+ echo "Cannot find config.m4. "
+ echo "Make sure that you run $0 in the top level source directory of the module"
+ exit 1
+fi
test -d build || mkdir build
-for i in fastgen.sh library.mk ltlib.mk program.mk rules.mk rules_pear.mk shtool; do
- cp $phpdir/$i build
-done
+(cd $phpdir && cp $FILES_BUILD $builddir/build)
+(cd $phpdir && cp $FILES $builddir)
mv build/rules_pear.mk build/rules.mk
-cp $phpdir/acinclude.m4 .
-
sed \
-e "s#@prefix@#$prefix#" \
< $phpdir/pear.m4 > configure.in
-touch .deps install-sh mkinstalldirs missing
+touch install-sh mkinstalldirs missing
aclocal
autoconf