]> granicus.if.org Git - php/commitdiff
further fixes to win build
authorAnatol Belski <ab@php.net>
Mon, 10 Nov 2014 23:38:37 +0000 (00:38 +0100)
committerAnatol Belski <ab@php.net>
Mon, 10 Nov 2014 23:38:37 +0000 (00:38 +0100)
- fixed pdb generation with vs
- made object-out-dir to use an absolute path, that fixes path issues
  with x86/x64 and nmake snap

win32/build/Makefile
win32/build/config.w32
win32/build/config.w32.phpize.in
win32/build/confutils.js

index 90f02d24943f08d494fbb42323902a607ba304d8..d6a22c162c6b8ce9065ed425688dba0464e4360f 100644 (file)
@@ -158,19 +158,14 @@ build-dist: $(BUILD_DIR)\deplister.exe
        $(BUILD_DIR)\php.exe -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php "$(BUILD_DIR)" "$(PHP_BUILD)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES)" "$(SNAPSHOT_TEMPLATE)"
        cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
        -$(ZIP) -9 -q -r ..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip .
-       cd ..\..
        cd $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
        -$(ZIP) -9 -q -r ..\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip .
-       cd ..\..
        cd $(BUILD_DIR)\php-test-pack-$(PHP_VERSION_STRING)
        -$(ZIP) -9 -q -r ..\php-test-pack-$(PHP_VERSION_STRING).zip .
-       cd ..\..
        cd $(BUILD_DIR)
        -$(ZIP) -9 -q php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip *.pdb
-       cd
-       cd
        -$(ZIP) -9 -q -r php-devel-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip $(BUILD_DIR_DEV_NAME)
-       cd ..\..
+       cd $(BUILD_DIR)
 
 dist: all build-dist
 snap: build-snap build-devel build-dist
index 43ff038062edf699bce043238971e13a9ae804f5..85a96f1694fdd5258f66a66497ef2e7ce608ddc7 100644 (file)
@@ -27,18 +27,7 @@ toolset_setup_project_tools();
 
 // stick objects somewhere outside of the source tree
 ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', '');
-if (PHP_OBJECT_OUT_DIR.length) {
-       PHP_OBJECT_OUT_DIR = FSO.GetAbsolutePathName(PHP_OBJECT_OUT_DIR);
-       if (!FSO.FolderExists(PHP_OBJECT_OUT_DIR)) {
-               ERROR('you chosen output directory ' + PHP_OBJECT_OUT_DIR + ' does not exist');
-       }
-       PHP_OBJECT_OUT_DIR += '\\';
-} else if (X64) {
-       if (!FSO.FolderExists("x64")) {
-               FSO.CreateFolder("x64");
-       }
-       PHP_OBJECT_OUT_DIR = 'x64\\';
-}
+object_out_dir_option_handle();
 
 ARG_ENABLE('debug', 'Compile with debugging symbols', "no");
 ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');
index e2860e3a963269de4f5b6c89a4efcf5962404f8d..52947c1ace862912aa66c0f23836be16f8a4be3d 100644 (file)
@@ -27,18 +27,7 @@ toolset_setup_project_tools();
 \r
 // stick objects somewhere outside of the source tree\r
 ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', '');\r
-if (PHP_OBJECT_OUT_DIR.length) {\r
-       PHP_OBJECT_OUT_DIR = FSO.GetAbsolutePathName(PHP_OBJECT_OUT_DIR);\r
-       if (!FSO.FolderExists(PHP_OBJECT_OUT_DIR)) {\r
-               ERROR('you chosen output directory ' + PHP_OBJECT_OUT_DIR + ' does not exist');\r
-       }\r
-       PHP_OBJECT_OUT_DIR += '\\';\r
-} else if (X64) {\r
-       if (!FSO.FolderExists("x64")) {\r
-               FSO.CreateFolder("x64");\r
-       }\r
-       PHP_OBJECT_OUT_DIR = 'x64\\';\r
-}\r
+object_out_dir_option_handle();\r
 \r
 ARG_ENABLE('debug', 'Compile with debugging symbols', "no");\r
 ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');\r
index bad5f1322ea75e6b72015d01653ef9ae7f45d532..c73ae6b2fdb05184b6273098da9d0b9c5b689ea5 100644 (file)
@@ -1439,7 +1439,10 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
        sub_build += d;
 
 
-       DEFINE(bd_flags_name, " /Fp" + sub_build + " /FR" + sub_build + " ");
+       DEFINE(bd_flags_name, "/Fp" + sub_build + " /FR" + sub_build + " ");
+       if (VS_TOOLSET) {
+               ADD_FLAG(bd_flags_name, "/Fd" + sub_build);
+       }
 
        for (i in file_list) {
                src = file_list[i];
@@ -2617,3 +2620,23 @@ function toolset_setup_build_mode()
        }
 }
 
+function object_out_dir_option_handle()
+{
+       if (PHP_OBJECT_OUT_DIR.length) {
+               PHP_OBJECT_OUT_DIR = FSO.GetAbsolutePathName(PHP_OBJECT_OUT_DIR);
+               if (!FSO.FolderExists(PHP_OBJECT_OUT_DIR)) {
+                       ERROR('you chosen output directory ' + PHP_OBJECT_OUT_DIR + ' does not exist');
+               }
+               PHP_OBJECT_OUT_DIR += '\\';
+       } else {
+               PHP_OBJECT_OUT_DIR = FSO.GetAbsolutePathName(".");
+
+               if (X64) {
+                       PHP_OBJECT_OUT_DIR += '\\x64\\';
+                       if (!FSO.FolderExists(PHP_OBJECT_OUT_DIR)) {
+                               FSO.CreateFolder(PHP_OBJECT_OUT_DIR);
+                       }
+               }
+       }
+}
+