]> granicus.if.org Git - php/commitdiff
- add nmake install-sdk (create the devel package) and related sub rules
authorPierre Joye <pajoye@php.net>
Tue, 14 Dec 2010 02:55:26 +0000 (02:55 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 14 Dec 2010 02:55:26 +0000 (02:55 +0000)
win32/build/Makefile
win32/build/confutils.js

index 203b03850db7a8359ae2af4eb170f47b0159b9cd..cb9f4afaadadb7c7cebd318bb5c096b831ec979f 100644 (file)
@@ -25,10 +25,12 @@ RE2C="$(RE2C)"
 PHP_BUILD=$(PHP_BUILD)
 
 MCFILE=$(BUILD_DIR)\wsyslog.rc
+BUILD_DIR_DEV_NAME=php-$(PHP_VERSION_STRING)-devel-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE)
+BUILD_DIR_DEV=$(BUILD_DIR)\$(BUILD_DIR_DEV_NAME)
 
 all: generated_files $(EXT_TARGETS) $(PECL_TARGETS) $(SAPI_TARGETS)
 
-build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB)
+build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV)
 
 !if $(RE2C) == ""
 generated_files: build_dirs Zend\zend_ini_parser.c \
@@ -85,10 +87,11 @@ $(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EX
 
 $(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL)
 
-$(BUILD_DIR) $(BUILD_DIRS_SUB):
+$(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV):
        @echo Recreating build dirs
        @if not exist $(BUILD_DIR) mkdir $(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
 
 clean-sapi:
        @echo Cleaning SAPI
@@ -140,10 +143,13 @@ build-dist: $(BUILD_DIR)\deplister.exe
        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 ..\..
 
 dist: all build-dist
-snap: build-snap build-dist
+snap: build-devel build-lib build-snap 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
@@ -152,23 +158,26 @@ msi-installer: dist
        $(BUILD_DIR)\php.exe ..\php-installer\build-installer.php "$(BUILD_DIR)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS)" "$(PECL_TARGETS)"
 
 # need to redirect, since INSTALL is a file in the root...
-install: really-install install-devel install-lib
-
-install-lib:
-       @if not exist $(PHP_PREFIX)\lib mkdir $(PHP_PREFIX)\lib >nul
-       @copy $(BUILD_DIR)\$(PHPLIB) $(PHP_PREFIX)\lib /y >nul
-
-install-devel: install-headers
-       @if not exist $(PHP_PREFIX)\script mkdir $(PHP_PREFIX)\script >nul
-       @if not exist $(PHP_PREFIX)\build mkdir $(PHP_PREFIX)\build >nul
-       @copy win32\build\confutils.js $(PHP_PREFIX)\script\ /y >nul
-       @copy win32\build\configure.tail $(PHP_PREFIX)\script\ /y >nul
-       @copy win32\build\config.w32.phpize.in $(PHP_PREFIX)\script\ /y >nul
-       @copy win32\build\Makefile.phpize $(PHP_PREFIX)\script\ /y >nul
-       @copy win32\build\phpize.bat $(PHP_PREFIX)\ /y >nul
-       @copy win32\build\template.rc $(PHP_PREFIX)\build\ /y >nul
-       @copy $(BUILD_DIR)\devel\config.phpize.js $(PHP_PREFIX)\script\ /y >nul
-       @copy $(BUILD_DIR)\devel\phpize.js $(PHP_PREFIX)\script\ /y >nul
+install: really-install install-sdk
+
+build-lib:
+       @if not exist $(BUILD_DIR_DEV)\lib mkdir $(BUILD_DIR_DEV)\lib >nul
+       @copy $(BUILD_DIR)\$(PHPLIB) $(BUILD_DIR_DEV)\lib /y >nul
+
+build-devel: build-headers build-lib
+       @if not exist $(BUILD_DIR_DEV)\script mkdir $(BUILD_DIR_DEV)\script >nul
+       @if not exist $(BUILD_DIR_DEV)\build mkdir $(BUILD_DIR_DEV)\build >nul
+       @copy win32\build\confutils.js $(BUILD_DIR_DEV)\script\ /y >nul
+       @copy win32\build\configure.tail $(BUILD_DIR_DEV)\script\ /y >nul
+       @copy win32\build\config.w32.phpize.in $(BUILD_DIR_DEV)\script\ /y >nul
+       @copy win32\build\Makefile.phpize $(BUILD_DIR_DEV)\script\ /y >nul
+       @copy win32\build\phpize.bat $(BUILD_DIR_DEV)\ /y >nul
+       @copy win32\build\template.rc $(BUILD_DIR_DEV)\build\ /y >nul
+       @copy $(BUILD_DIR)\devel\config.phpize.js $(BUILD_DIR_DEV)\script\ /y >nul
+       @copy $(BUILD_DIR)\devel\phpize.js $(BUILD_DIR_DEV)\script\ /y >nul
+
+install-sdk: build-devel
+       @xcopy /Q /Y /E /I $(BUILD_DIR_DEV)\* $(PHP_PREFIX)\SDK
 
 really-install:
        @if not exist $(PHP_PREFIX) mkdir $(PHP_PREFIX)
index 2609cf5c9696cc8898104372d38219e90c2d25ce..3b5c88014460cbb69ff5ec6c922a6edb79764b3a 100644 (file)
@@ -1720,17 +1720,17 @@ function generate_makefile()
 \r
        MF.Write(TF.ReadAll());\r
 \r
-       MF.WriteLine("install-headers:");\r
-       MF.WriteLine("  @if not exist $(PHP_PREFIX)\\include mkdir $(PHP_PREFIX)\\include >nul");\r
-       MF.WriteLine("  @for %D in ($(INSTALL_HEADERS_DIR)) do @if not exist $(PHP_PREFIX)\\include\\%D mkdir $(PHP_PREFIX)\\include\\%D >nul");\r
+       MF.WriteLine("build-headers:");\r
+       MF.WriteLine("  @if not exist $(BUILD_DIR_DEV)\\include mkdir $(BUILD_DIR_DEV)\\include >nul");\r
+       MF.WriteLine("  @for %D in ($(INSTALL_HEADERS_DIR)) do @if not exist $(BUILD_DIR_DEV)\\include\\%D mkdir $(BUILD_DIR_DEV)\\include\\%D >nul");\r
        for (i in headers_install) {\r
                if (headers_install[i][2] != "") {\r
-                               MF.WriteLine("  @if not exist $(PHP_PREFIX)\\include\\" + headers_install[i][2] + " mkdir $(PHP_PREFIX)\\include\\" + \r
+                               MF.WriteLine("  @if not exist $(BUILD_DIR_DEV)\\include\\" + headers_install[i][2] + " mkdir $(BUILD_DIR_DEV)\\include\\" + \r
                                                                                                headers_install[i][2] + ">nul");\r
-                               MF.WriteLine("  @copy " + headers_install[i][0] + " " + "$(PHP_PREFIX)\\include\\" + headers_install[i][2] + " /y >nul");\r
+                               MF.WriteLine("  @copy " + headers_install[i][0] + " " + "$(BUILD_DIR_DEV)\\include\\" + headers_install[i][2] + " /y >nul");\r
                }\r
        }\r
-       MF.WriteLine("  @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(PHP_PREFIX)\\include\\%D /y >nul");\r
+       MF.WriteLine("  @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(BUILD_DIR_DEV)\\include\\%D /y >nul");\r
        TF.Close();\r
 \r
        MF.WriteBlankLines(2);\r