diff options
author | Pierre Joye <pajoye@php.net> | 2010-12-14 23:21:53 (GMT) |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-12-14 23:21:53 (GMT) |
commit | b25ded66ea8d3a744241888ea6c60c119e069f17 (patch) | |
tree | a7999fe6ab528dd36967106747e8f7d9f43689b6 /win32 | |
parent | 844a58dc3cc53d44ee77f91e7d3b9efce6256e21 (diff) | |
download | php-b25ded66ea8d3a744241888ea6c60c119e069f17.tar.gz |
- sync with 5.3
Diffstat (limited to 'win32')
-rw-r--r-- | win32/build/Makefile | 10 | ||||
-rw-r--r-- | win32/build/confutils.js | 12 |
2 files changed, 19 insertions, 3 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile index cb9f4af..0ae5e23 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -90,8 +90,11 @@ $(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL) $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV): @echo Recreating build dirs @if not exist $(BUILD_DIR) mkdir $(BUILD_DIR) + @cd $(BUILD_DIR) @for %D in ($(BUILD_DIRS_SUB)) do @if not exist %D @mkdir %D > NUL @if not exist $(BUILD_DIR_DEV) @mkdir $(BUILD_DIR_DEV) > NUL + @cd $(PHP_SRC_DIR) + clean-sapi: @echo Cleaning SAPI @@ -102,7 +105,9 @@ clean-sapi: clean: clean-sapi @echo Cleaning distribution build dirs + @cd $(BUILD_DIR) @for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL + @cd $(PHP_SRC_DIR) -@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)-Win32.zip $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip > NUL -rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING) @@ -112,7 +117,9 @@ clean-pecl: clean-all: @echo Cleaning standard build dirs + @cd $(BUILD_DIR) @for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D + @cd $(PHP_SRC_DIR) -@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.dbg $(BUILD_DIR)\*.bin $(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe > NUL test: @@ -149,7 +156,7 @@ build-dist: $(BUILD_DIR)\deplister.exe cd ..\.. dist: all build-dist -snap: build-devel build-lib build-snap build-dist +snap: build-snap build-devel build-dist $(BUILD_DIR)\deplister.exe: win32\build\deplister.c $(PHP_CL) /Fo$(BUILD_DIR)\ /Fd$(BUILD_DIR)\ /Fp$(BUILD_DIR)\ /FR$(BUILD_DIR) /Fe$(BUILD_DIR)\deplister.exe win32\build\deplister.c imagehlp.lib @@ -187,3 +194,4 @@ really-install: @echo Registering event source with syslog (requires admin rights) @echo It's okay for this step to fail: -$(PHP_PREFIX)\php.exe -n -dextension_dir=$(PHP_PREFIX) win32/build/registersyslog.php $(PHP_PREFIX)\$(PHPDLL) + diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 3b5c880..c2a4b93 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -27,6 +27,7 @@ var MFO = null; var SYSTEM_DRIVE = WshShell.Environment("Process").Item("SystemDrive");
var PROGRAM_FILES = WshShell.Environment("Process").Item("ProgramFiles");
var DSP_FLAGS = new Array();
+var PHP_SRC_DIR=FSO.GetParentFolderName(WScript.ScriptFullName);
/* Store the enabled extensions (summary + QA check) */
var extensions_enabled = new Array();
@@ -1553,7 +1554,14 @@ function generate_files() continue;
}
last = bd;
- ADD_FLAG("BUILD_DIRS_SUB", bd.replace(new RegExp('^'+dir+'\\\\'), '$(BUILD_DIR)\\'));
+
+ build_dir = get_define('BUILD_DIR');
+ build_dir = build_dir.replace(new RegExp("\\\\", "g"), "\\\\");
+ if (build_dir.substr(build_dir.Length - 2, 2) != '\\\\') {
+ build_dir += '\\\\';
+ }
+ ADD_FLAG("BUILD_DIRS_SUB", bd.replace(new RegExp(build_dir), ''));
+
if (!FSO.FolderExists(bd)) {
FSO.CreateFolder(bd);
}
@@ -1699,7 +1707,7 @@ function generate_makefile() /* spit out variable definitions */
var keys = (new VBArray(configure_subst.Keys())).toArray();
var i;
-
+ MF.WriteLine("PHP_SRC_DIR =" + PHP_SRC_DIR);
for (i in keys) {
// The trailing space is needed to prevent the trailing backslash
// that is part of the build dir flags (CFLAGS_BD_XXX) from being
|