cvs: php-src /win32/build Makefile buildconf.js confutils.js

From: Date: Thu, 12 Feb 2004 12:30:43 +0000
Subject: cvs: php-src /win32/build Makefile buildconf.js confutils.js
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-26150@lists.php.net to get a copy of this message
wez Thu Feb 12 07:30:43 2004 EDT Modified files: /php-src/win32/build Makefile buildconf.js confutils.js Log: Tidy up "nmake clean" for people that don't have a PECL checkout. Be paranoid when building a snapshot: if the module is not a core module (eg: it comes from outside of ext or sapi) and it defaults to "yes", then force it to become shared. This will prevent a pecl ext from accidentally being compiled statically into the core, and prevent that ext from breaking the core build. You can still manually force a static build by explicitly specifying the args for that extension on your configure line. http://cvs.php.net/diff.php/php-src/win32/build/Makefile?r1=1.18&r2=1.19&ty=u Index: php-src/win32/build/Makefile diff -u php-src/win32/build/Makefile:1.18 php-src/win32/build/Makefile:1.19 --- php-src/win32/build/Makefile:1.18 Fri Jan 9 20:11:42 2004 +++ php-src/win32/build/Makefile Thu Feb 12 07:30:41 2004 @@ -14,7 +14,7 @@ # | Author: Wez Furlong <wez@thebrainroom.com> | # +----------------------------------------------------------------------+ # -# $Id: Makefile,v 1.18 2004/01/10 01:11:42 wez Exp $ +# $Id: Makefile,v 1.19 2004/02/12 12:30:41 wez Exp $ # This is the makefile template for the win32 build CC="$(CL)" @@ -65,15 +65,15 @@ clean-sapi: @echo Cleaning SAPI - @for %D in ($(EXT_TARGETS)) do @del /F /Q $(BUILD_DIR)\%D > NUL - @for %D in ($(PECL_TARGETS)) do @del /F /Q $(BUILD_DIR)\%D > NUL - @for %D in ($(SAPI_TARGETS)) do @del /F /Q $(BUILD_DIR)\%D > NUL - @del /F /Q $(BUILD_DIR)\$(PHPDLL) + @for %D in (_x $(EXT_TARGETS)) do @if exist $(BUILD_DIR)\%D @del /F /Q $(BUILD_DIR)\%D > NUL + @for %D in (_x $(PECL_TARGETS)) do @if exist $(BUILD_DIR)\%D @del /F /Q $(BUILD_DIR)\%D > NUL + @for %D in (_x $(SAPI_TARGETS)) do @if exist $(BUILD_DIR)\%D @del /F /Q $(BUILD_DIR)\%D > NUL + -@del /F /Q $(BUILD_DIR)\$(PHPDLL) clean: clean-sapi - @echo Cleaning - @for %D in ($(BUILD_DIRS_SUB)) do @del /F /Q %D\*.* > NUL - @del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING).zip > NUL + @echo Cleaning build dirs + @for %D in (_x $(BUILD_DIRS_SUB)) do @if exist @del /F /Q %D\*.* > NUL + -@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING).zip > NUL -rmdir /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING) test: @@ -84,9 +84,9 @@ build-snap: @$(MAKE) "$(BUILD_DIR)\$(PHPDLL)" - for %T in ($(SAPI_TARGETS)) do $(MAKE) /I /nologo "%T" - for %T in ($(EXT_TARGETS)) do $(MAKE) /I /nologo "%T" - for %T in ($(PECL_TARGETS)) do $(MAKE) /I /nologo "%T" + -for %T in ($(SAPI_TARGETS)) do $(MAKE) /I /nologo "%T" + -for %T in ($(EXT_TARGETS)) do $(MAKE) /I /nologo "%T" + -for %T in ($(PECL_TARGETS)) do $(MAKE) /I /nologo "%T" build-dist: $(BUILD_DIR)\deplister.exe -rmdir /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING) http://cvs.php.net/diff.php/php-src/win32/build/buildconf.js?r1=1.10&r2=1.11&ty=u Index: php-src/win32/build/buildconf.js diff -u php-src/win32/build/buildconf.js:1.10 php-src/win32/build/buildconf.js:1.11 --- php-src/win32/build/buildconf.js:1.10 Thu Jan 8 16:53:48 2004 +++ php-src/win32/build/buildconf.js Thu Feb 12 07:30:41 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: buildconf.js,v 1.10 2004/01/08 21:53:48 wez Exp $ */ +/* $Id: buildconf.js,v 1.11 2004/02/12 12:30:41 wez Exp $ */ // This generates a configure script for win32 build WScript.StdOut.WriteLine("Rebuilding configure.js"); @@ -99,6 +99,30 @@ } } +// Emit core modules array. This is used by a snapshot +// build to override a default "yes" value so that external +// modules don't break the build by becoming statically compiled +function emit_core_module_list() +{ + var module_names = (new VBArray(MODULES.Keys())).toArray(); + var i, mod_name, j; + var item; + var output = ""; + + C.WriteLine("core_module_list = new Array("); + + // first, look for modules with empty deps; emit those first + for (i in module_names) { + mod_name = module_names[i]; + C.WriteLine("\"" + mod_name.replace(/_/g, "-") + "\","); + } + + C.WriteLine("false // dummy"); + + C.WriteLine(");"); +} + + function emit_module(item) { return item.dir_line + item.content; @@ -168,11 +192,14 @@ find_config_w32("."); find_config_w32("sapi"); find_config_w32("ext"); +emit_core_module_list(); + find_config_w32("pecl"); find_config_w32("..\\pecl"); find_config_w32("pecl\\rpc"); find_config_w32("..\\pecl\\rpc"); + // Now generate contents of module based on MODULES, chasing dependencies // to ensure that dependent modules are emitted first modules += gen_modules(); http://cvs.php.net/diff.php/php-src/win32/build/confutils.js?r1=1.37&r2=1.38&ty=u Index: php-src/win32/build/confutils.js diff -u php-src/win32/build/confutils.js:1.37 php-src/win32/build/confutils.js:1.38 --- php-src/win32/build/confutils.js:1.37 Fri Jan 9 10:11:19 2004 +++ php-src/win32/build/confutils.js Thu Feb 12 07:30:41 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.37 2004/01/09 15:11:19 wez Exp $ +// $Id: confutils.js,v 1.38 2004/02/12 12:30:41 wez Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -340,7 +340,10 @@ } var snapshot_build_exclusions = new Array( - 'debug', 'crt-debug', 'lzf-better-compression', 'php-build', 'snapshot-template' + 'debug', 'crt-debug', 'lzf-better-compression', + 'php-build', 'snapshot-template', + 'pcre-regex', 'fastcgi', 'force-cgi-redirect', + 'path-info-check', 'zts', 'ipv6' ); // Now set any defaults we might have missed out earlier @@ -351,6 +354,37 @@ analyzed = analyze_arg(arg.defval); shared = analyzed[0]; argval = analyzed[1]; + + // Don't trust a default "yes" answer for a non-core module + // in a snapshot build + if (PHP_SNAPSHOT_BUILD != "no" && argval == "yes" && !shared) { + var force; + + force = true; + for (j = 0; j < snapshot_build_exclusions.length; j++) { + if (snapshot_build_exclusions[j] == arg.optname) { + force = false; + break; + } + } + + if (force) { + /* now check if it is a core module */ + force = false; + for (j = 0; j < core_module_list.length; j++) { + if (core_module_list[j] == arg.optname) { + force = true; + break; + } + } + + if (!force) { + STDOUT.WriteLine("snapshot: forcing " + arg.arg + " shared"); + shared = true; + } + } + } + if (PHP_SNAPSHOT_BUILD != "no" && argval == "no") { var force; @@ -362,7 +396,7 @@ } } if (force) { - STDOUT.WriteLine("snapshot: forcing " + arg.arg + " on"); + STDOUT.WriteLine("snapshot: forcing " + arg.optname + " on"); argval = "yes"; shared = true; }

« previous php.cvs (#26150) next »