]> granicus.if.org Git - php/commitdiff
- fix build with out of src obj dir
authorPierre Joye <pajoye@php.net>
Tue, 14 Dec 2010 23:09:31 +0000 (23:09 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 14 Dec 2010 23:09:31 +0000 (23:09 +0000)
win32/build/Makefile
win32/build/confutils.js

index b63453b67bf952643c79e0d7e10b2b2f5711ff22..586165ac949af2d0967c1efc849bd68b3a55ea2e 100644 (file)
@@ -4,7 +4,7 @@
 #  | Copyright (c) 1997-2008 The PHP Group                                |
 #  +----------------------------------------------------------------------+
 #  | This source file is subject to version 3.01 of the PHP license,      |
-#  | that is bundled with this package in the file LICENSE, and is        |
+#  | that is bundled with this package in the file LICENSE, and is        |3
 #  | available through the world-wide-web at the following url:           |
 #  | http://www.php.net/license/3_01.txt                                  |
 #  | If you did not receive a copy of the PHP license and are unable to   |
@@ -92,8 +92,9 @@ $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV):
        @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
-       @cd ../..
        @if not exist $(BUILD_DIR_DEV) @mkdir $(BUILD_DIR_DEV) > NUL
+       @cd $(PHP_SRC_DIR)
+       
 
 clean-sapi:
        @echo Cleaning SAPI
@@ -106,7 +107,7 @@ 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 ..\..
+       @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)
 
@@ -118,7 +119,7 @@ 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 ..\..
+       @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:
@@ -131,7 +132,7 @@ build-snap: generated_files
        -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 build-devel build-lib 
+build-dist: $(BUILD_DIR)\deplister.exe
        -rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
        -rd /s /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
        -del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
index 7818b4e4ce256962a36ccbc22dc75c178fcbfac6..c2a4b93e81b2cd6429d5c43efff5e75cc74b2607 100644 (file)
@@ -27,6 +27,7 @@ var MFO = null;
 var SYSTEM_DRIVE = WshShell.Environment("Process").Item("SystemDrive");\r
 var PROGRAM_FILES = WshShell.Environment("Process").Item("ProgramFiles");\r
 var DSP_FLAGS = new Array();\r
+var PHP_SRC_DIR=FSO.GetParentFolderName(WScript.ScriptFullName);\r
 \r
 /* Store the enabled extensions (summary + QA check) */\r
 var extensions_enabled = new Array();\r
@@ -1553,12 +1554,14 @@ function generate_files()
                        continue;\r
                }\r
                last = bd;\r
+\r
                build_dir = get_define('BUILD_DIR');\r
                build_dir = build_dir.replace(new RegExp("\\\\", "g"), "\\\\");\r
                if (build_dir.substr(build_dir.Length - 2, 2) != '\\\\') {\r
                        build_dir += '\\\\';\r
                }\r
                ADD_FLAG("BUILD_DIRS_SUB", bd.replace(new RegExp(build_dir), ''));\r
+\r
                if (!FSO.FolderExists(bd)) {\r
                        FSO.CreateFolder(bd);\r
                }\r
@@ -1704,7 +1707,7 @@ function generate_makefile()
        /* spit out variable definitions */\r
        var keys = (new VBArray(configure_subst.Keys())).toArray();\r
        var i;\r
-\r
+       MF.WriteLine("PHP_SRC_DIR =" + PHP_SRC_DIR);\r
        for (i in keys) {\r
                // The trailing space is needed to prevent the trailing backslash\r
                // that is part of the build dir flags (CFLAGS_BD_XXX) from being\r