pajoye Sun Oct 26 00:14:23 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/win32/build Makefile mkdist.php
Log:
- add php-test-pack-[version].zip to nmake snap so we can distribute the
tests as single zip
TODO: add run-tests.bat to the package
http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.35.2.1.2.6.2.8&r2=1.35.2.1.2.6.2.9&diff_format=u
Index: php-src/win32/build/Makefile
diff -u php-src/win32/build/Makefile:1.35.2.1.2.6.2.8
php-src/win32/build/Makefile:1.35.2.1.2.6.2.9
--- php-src/win32/build/Makefile:1.35.2.1.2.6.2.8 Fri Sep 26 13:29:11 2008
+++ php-src/win32/build/Makefile Sun Oct 26 00:14:23 2008
@@ -14,7 +14,7 @@
# | Author: Wez Furlong <[EMAIL PROTECTED]> |
# +----------------------------------------------------------------------+
#
-# $Id: Makefile,v 1.35.2.1.2.6.2.8 2008/09/26 13:29:11 pajoye Exp $
+# $Id: Makefile,v 1.35.2.1.2.6.2.9 2008/10/26 00:14:23 pajoye Exp $
# This is the makefile template for the win32 build
CC="$(CL)"
@@ -131,13 +131,16 @@
-del /f /q
$(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
$(BUILD_DIR)\php.exe -n win32/build/mkdist.php "$(BUILD_DIR)"
"$(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 -r
..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
.
+ -$(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 -r
..\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
.
+ -$(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
php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
*.pdb
+ -$(ZIP) -9 -q
php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
*.pdb
cd ..\..
dist: all build-dist
http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.13.4.1.2.5&r2=1.13.4.1.2.6&diff_format=u
Index: php-src/win32/build/mkdist.php
diff -u php-src/win32/build/mkdist.php:1.13.4.1.2.5
php-src/win32/build/mkdist.php:1.13.4.1.2.6
--- php-src/win32/build/mkdist.php:1.13.4.1.2.5 Mon Sep 1 18:19:58 2008
+++ php-src/win32/build/mkdist.php Sun Oct 26 00:14:23 2008
@@ -1,4 +1,4 @@
-<?php # $Id: mkdist.php,v 1.13.4.1.2.5 2008/09/01 18:19:58 pajoye Exp $
+<?php # $Id: mkdist.php,v 1.13.4.1.2.6 2008/10/26 00:14:23 pajoye Exp $
/* piece together a windows binary distro */
$build_dir = $argv[1];
@@ -13,6 +13,7 @@
echo "Making dist for $build_dir\n";
$dist_dir = $build_dir . "/php-" . phpversion();
+$test_dir = $build_dir . "/php-test-pack-" . phpversion();
$pecl_dir = $build_dir . "/pecl-" . phpversion();
@mkdir($dist_dir);
@@ -346,6 +347,58 @@
closedir($d);
}
+
+
+function copy_test_dir($directory, $dest)
+{
+ if(substr($directory,-1) == '/') {
+ $directory = substr($directory,0,-1);
+ }
+
+ if ($directory == 'tests') {
+ mkdir($dest . '/tests', 0775, true);
+ copy_dir($directory, $dest . '/tests/');
+
+ return false;
+ }
+
+ if(!file_exists($directory) || !is_dir($directory)) {
+ echo "failed... $directory\n";
+ return FALSE;
+ }
+
+ $directory_list = opendir($directory);
+
+ while (FALSE !== ($file = readdir($directory_list))) {
+ $full_path = $directory . '/' . $file;
+ if($file != '.' && $file != '..' && $file != 'CVS' &&
is_dir($full_path)) {
+ if ($file == 'tests') {
+ mkdir($dest . '/' . $full_path , 0775, true);
+ copy_dir($full_path, $dest . '/' . $full_path .
'/');
+ continue;
+ } else {
+ copy_test_dir($full_path, $dest);
+ }
+ }
+ }
+
+ closedir($directory_list);
+}
+
+if (!is_dir($test_dir)) {
+ mkdir($test_dir);
+}
+
+$dirs = array(
+ 'ext',
+ 'Sapi',
+ 'Zend',
+ 'tests'
+);
+foreach ($dirs as $dir) {
+ copy_test_dir($dir, $test_dir);
+}
+
/* change this next line to true to use good-old
* hand-assembled go-pear-bundle from the snapshot template */
$use_pear_template = true;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php