cvs: /php4/build rules.mk
| From: | Sascha Schumann | Date: | Thu, 30 Dec 1999 07:16:14 +0000 |
| Subject: | cvs: /php4/build rules.mk | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8690@lists.php.net to get a copy of this message | ||
sas Thu Dec 30 02:16:14 1999 EDT
Modified files:
/php4/build rules.mk
Log:
Proper protection for GNU make's parallel build
Index: php4/build/rules.mk
diff -u php4/build/rules.mk:1.2 php4/build/rules.mk:1.3
--- php4/build/rules.mk:1.2 Thu Dec 30 00:53:27 1999
+++ php4/build/rules.mk Thu Dec 30 02:15:43 1999
@@ -21,7 +21,7 @@
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
-# $Id: rules.mk,v 1.2 1999/12/30 05:53:27 sas Exp $
+# $Id: rules.mk,v 1.3 1999/12/30 07:15:43 sas Exp $
#
include $(DEPTH)/config_vars.mk
@@ -73,17 +73,29 @@
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-all: all-recursive $(targets)
+all: all-recursive
+install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
- @target=
echo $@|sed s/-recursive//; \
- if test '$(NO_RECURSION)' != "$$target"; then \
+ @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"; \
- test "$$i" = "." || (cd $$i && $(MAKE) $$target) || exit 1; \
+ 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;
+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) *.c > .deps
@@ -96,8 +108,6 @@
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
-
-install: install-recursive $(targets) $(install_targets)
install-modules:
@test -d modules && \
@@ -110,4 +120,5 @@
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
-distclean-recursive distclean clean-x
+distclean-recursive distclean clean-x all-p install-p distclean-p \
+depend-p clean-p