[PHP-CVS] cvs: php-src /win32/build Makefile mkdist.php

2009-06-22 Thread Kalle Sommer Nielsen
kalle   Tue Jun 23 01:37:05 2009 UTC

  Modified files:  
/php-src/win32/buildMakefile mkdist.php 
  Log:
  * Fix deprecation warning when building deplister
  * Fix some mkdir warnings if nmake build-dist is executed twice
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.55r2=1.56diff_format=u
Index: php-src/win32/build/Makefile
diff -u php-src/win32/build/Makefile:1.55 php-src/win32/build/Makefile:1.56
--- php-src/win32/build/Makefile:1.55   Thu Jun 11 14:43:03 2009
+++ php-src/win32/build/MakefileTue Jun 23 01:37:05 2009
@@ -14,7 +14,7 @@
 #  | Author: Wez Furlong w...@thebrainroom.com   |
 #  +--+
 #
-# $Id: Makefile,v 1.55 2009/06/11 14:43:03 cellog Exp $
+# $Id: Makefile,v 1.56 2009/06/23 01:37:05 kalle Exp $
 # This is the makefile template for the win32 build
 
 CC=$(CL)
@@ -146,7 +146,7 @@
 snap: build-snap build-dist
 
 $(BUILD_DIR)\deplister.exe:win32\build\deplister.c
-   $(CL) /Fo$(BUILD_DIR)\ /Fd$(BUILD_DIR)\ /Fp$(BUILD_DIR)\ 
/FR$(BUILD_DIR) -o$(BUILD_DIR)\deplister.exe win32\build\deplister.c 
imagehlp.lib
+   $(CL) /Fo$(BUILD_DIR)\ /Fd$(BUILD_DIR)\ /Fp$(BUILD_DIR)\ 
/FR$(BUILD_DIR) /Fe$(BUILD_DIR)\deplister.exe win32\build\deplister.c 
imagehlp.lib
 
 msi-installer: dist
$(BUILD_DIR)\php.exe ..\php-installer\build-installer.php 
$(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) $(PECL_TARGETS)
http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.25r2=1.26diff_format=u
Index: php-src/win32/build/mkdist.php
diff -u php-src/win32/build/mkdist.php:1.25 php-src/win32/build/mkdist.php:1.26
--- php-src/win32/build/mkdist.php:1.25 Thu Jun 11 14:43:03 2009
+++ php-src/win32/build/mkdist.php  Tue Jun 23 01:37:05 2009
@@ -1,4 +1,4 @@
-?php # $Id: mkdist.php,v 1.25 2009/06/11 14:43:03 cellog Exp $
+?php # $Id: mkdist.php,v 1.26 2009/06/23 01:37:05 kalle Exp $
 /* piece together a windows binary distro */
 
 $build_dir = $argv[1];
@@ -382,7 +382,9 @@
$full_path = $directory . '/' . $file;
if($file != '.'  $file != '..'  $file != 'CVS'  
is_dir($full_path)) {
if ($file == 'tests') {
-   mkdir($dest . '/' . $full_path , 0775, true);
+   if (!is_dir($dest . '/' . $full_path)) {
+   mkdir($dest . '/' . $full_path , 0775, 
true);
+   }
copy_dir($full_path, $dest . '/' . $full_path . 
'/');
continue;
} else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32/build Makefile mkdist.php

2009-06-11 Thread Greg Beaver
cellog  Thu Jun 11 14:43:03 2009 UTC

  Modified files:  
/php-src/win32/buildMakefile mkdist.php 
  Log:
  MFB: add phar.phar generation to windows
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.54r2=1.55diff_format=u
Index: php-src/win32/build/Makefile
diff -u php-src/win32/build/Makefile:1.54 php-src/win32/build/Makefile:1.55
--- php-src/win32/build/Makefile:1.54   Wed May 27 01:46:27 2009
+++ php-src/win32/build/MakefileThu Jun 11 14:43:03 2009
@@ -14,7 +14,7 @@
 #  | Author: Wez Furlong w...@thebrainroom.com   |
 #  +--+
 #
-# $Id: Makefile,v 1.54 2009/05/27 01:46:27 kalle Exp $
+# $Id: Makefile,v 1.55 2009/06/11 14:43:03 cellog Exp $
 # This is the makefile template for the win32 build
 
 CC=$(CL)
@@ -128,7 +128,7 @@
-del /f /q 
$(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-del /f /q 
$(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-del /f /q 
$(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-   $(BUILD_DIR)\php.exe -d date.timezone=UTC -n win32/build/mkdist.php 
$(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) 
$(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES) 
$(SNAPSHOT_TEMPLATE)
+   $(BUILD_DIR)\php.exe -d date.timezone=UTC -n -dphar.readonly=0 
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 -q -r 
..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
 .
cd ..\..
http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.24r2=1.25diff_format=u
Index: php-src/win32/build/mkdist.php
diff -u php-src/win32/build/mkdist.php:1.24 php-src/win32/build/mkdist.php:1.25
--- php-src/win32/build/mkdist.php:1.24 Wed Jun  3 01:13:37 2009
+++ php-src/win32/build/mkdist.php  Thu Jun 11 14:43:03 2009
@@ -1,4 +1,4 @@
-?php # $Id: mkdist.php,v 1.24 2009/06/03 01:13:37 kalle Exp $
+?php # $Id: mkdist.php,v 1.25 2009/06/11 14:43:03 cellog Exp $
 /* piece together a windows binary distro */
 
 $build_dir = $argv[1];
@@ -394,6 +394,27 @@
closedir($directory_list); 
 }
 
+function make_phar_dot_phar($dist_dir)
+{
+  if (!extension_loaded('phar')) return;
+  $path_to_php = $dist_dir;
+  $path_to_phar = realpath(__DIR__ . '/../../ext/phar');
+  echo Generating pharcommand.phar\n;
+  $phar = new Phar($path_to_php . '/pharcommand.phar', 0, 'pharcommand');
+  foreach (new DirectoryIterator($path_to_phar . '/phar') as $file) {
+if ($file-isDir() || $file == 'phar.php') continue;
+echo 'adding ', $file, \n;
+$phar[(string) $file] = file_get_contents($path_to_phar.  '/phar/' . 
$file);
+  }
+  $phar-setSignatureAlgorithm(Phar::SHA1);
+  $stub = file($path_to_phar . '/phar/phar.php');
+  unset($stub[0]); // remove hashbang
+  $phar-setStub(implode('', $stub));
+
+  echo Creating phar.phar.bat\n;
+  file_put_contents($path_to_php . '/phar.phar.bat', %~dp0php.exe 
%~dp0pharcommand.phar %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n);
+}
+
 if (!is_dir($test_dir)) {
mkdir($test_dir);
 }
@@ -491,4 +512,5 @@
echo WARNING: you don't have a snapshot template, your dist will not 
be complete\n;
 }
 
+make_phar_dot_phar($dist_dir);
 ?



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32/build Makefile mkdist.php

2009-03-30 Thread Kalle Sommer Nielsen
kalle   Mon Mar 30 14:32:20 2009 UTC

  Modified files:  
/php-src/win32/buildMakefile mkdist.php 
  Log:
  * Bypass the date/timezone warning by forcing UTC when running mkdist.php
  * Don't run the copy list for PECL if theres no PECL extensions to copy 
(fixes a few copy() warnings)
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.52r2=1.53diff_format=u
Index: php-src/win32/build/Makefile
diff -u php-src/win32/build/Makefile:1.52 php-src/win32/build/Makefile:1.53
--- php-src/win32/build/Makefile:1.52   Fri Nov 21 14:05:04 2008
+++ php-src/win32/build/MakefileMon Mar 30 14:32:20 2009
@@ -14,7 +14,7 @@
 #  | Author: Wez Furlong w...@thebrainroom.com   |
 #  +--+
 #
-# $Id: Makefile,v 1.52 2008/11/21 14:05:04 pajoye Exp $
+# $Id: Makefile,v 1.53 2009/03/30 14:32:20 kalle Exp $
 # This is the makefile template for the win32 build
 
 CC=$(CL)
@@ -131,7 +131,7 @@
-del /f /q 
$(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-del /f /q 
$(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-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)
+   $(BUILD_DIR)\php.exe -d date.timezone=UTC -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 -q -r 
..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
 .
cd ..\..
http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.21r2=1.22diff_format=u
Index: php-src/win32/build/mkdist.php
diff -u php-src/win32/build/mkdist.php:1.21 php-src/win32/build/mkdist.php:1.22
--- php-src/win32/build/mkdist.php:1.21 Tue Mar 24 22:16:57 2009
+++ php-src/win32/build/mkdist.php  Mon Mar 30 14:32:20 2009
@@ -1,4 +1,4 @@
-?php # $Id: mkdist.php,v 1.21 2009/03/24 22:16:57 pajoye Exp $
+?php # $Id: mkdist.php,v 1.22 2009/03/30 14:32:20 kalle Exp $
 /* piece together a windows binary distro */
 
 $build_dir = $argv[1];
@@ -214,7 +214,9 @@
 copy_file_list($build_dir, $dist_dir/ext, $ext_targets);
 
 /* pecl sapi and extensions */
-copy_file_list($build_dir, $pecl_dir, $pecl_targets);
+if(sizeof($pecl_targets)) {
+   copy_file_list($build_dir, $pecl_dir, $pecl_targets);
+}
 
 /* populate reading material */
 $text_files = array(



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32/build Makefile mkdist.php

2008-10-25 Thread Pierre-Alain Joye
pajoye  Sun Oct 26 00:15:57 2008 UTC

  Modified files:  
/php-src/win32/buildMakefile mkdist.php 
  Log:
  - MFH: 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.50r2=1.51diff_format=u
Index: php-src/win32/build/Makefile
diff -u php-src/win32/build/Makefile:1.50 php-src/win32/build/Makefile:1.51
--- php-src/win32/build/Makefile:1.50   Fri Sep 26 13:31:01 2008
+++ php-src/win32/build/MakefileSun Oct 26 00:15:56 2008
@@ -14,7 +14,7 @@
 #  | Author: Wez Furlong [EMAIL PROTECTED]   |
 #  +--+
 #
-# $Id: Makefile,v 1.50 2008/09/26 13:31:01 pajoye Exp $
+# $Id: Makefile,v 1.51 2008/10/26 00:15:56 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.18r2=1.19diff_format=u
Index: php-src/win32/build/mkdist.php
diff -u php-src/win32/build/mkdist.php:1.18 php-src/win32/build/mkdist.php:1.19
--- php-src/win32/build/mkdist.php:1.18 Mon Sep  1 18:21:06 2008
+++ php-src/win32/build/mkdist.php  Sun Oct 26 00:15:56 2008
@@ -1,4 +1,4 @@
-?php # $Id: mkdist.php,v 1.18 2008/09/01 18:21:06 pajoye Exp $
+?php # $Id: mkdist.php,v 1.19 2008/10/26 00:15:56 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



[PHP-CVS] cvs: php-src /win32/build Makefile mkdist.php

2004-01-07 Thread Wez Furlong
wez Wed Jan  7 18:12:04 2004 EDT

  Modified files:  
/php-src/win32/buildMakefile mkdist.php 
  Log:
  tweak snap build
  
Index: php-src/win32/build/Makefile
diff -u php-src/win32/build/Makefile:1.12 php-src/win32/build/Makefile:1.13
--- php-src/win32/build/Makefile:1.12   Tue Dec 23 10:33:13 2003
+++ php-src/win32/build/MakefileWed Jan  7 18:11:54 2004
@@ -14,7 +14,7 @@
 #  | Author: Wez Furlong [EMAIL PROTECTED]   |
 #  +--+
 #
-# $Id: Makefile,v 1.12 2003/12/23 15:33:13 wez Exp $
+# $Id: Makefile,v 1.13 2004/01/07 23:11:54 wez Exp $
 # This is the makefile template for the win32 build
 
 CC=$(CL)
@@ -82,8 +82,8 @@
 
 build-snap:
@$(MAKE) $(BUILD_DIR)\$(PHPDLL)
-   for %T in ($(SAPI_TARGETS)) do $(MAKE) /nologo %T
-   for %T in ($(EXT_TARGETS)) do $(MAKE) /nologo %T
+   for %T in ($(SAPI_TARGETS)) do $(MAKE) /I /nologo %T
+   for %T in ($(EXT_TARGETS)) do $(MAKE) /I /nologo %T
 
 build-dist: $(BUILD_DIR)\deplister.exe
-rmdir /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
Index: php-src/win32/build/mkdist.php
diff -u php-src/win32/build/mkdist.php:1.5 php-src/win32/build/mkdist.php:1.6
--- php-src/win32/build/mkdist.php:1.5  Tue Dec 23 10:33:13 2003
+++ php-src/win32/build/mkdist.php  Wed Jan  7 18:11:54 2004
@@ -1,4 +1,4 @@
-?php # $Id: mkdist.php,v 1.5 2003/12/23 15:33:13 wez Exp $
+?php # $Id: mkdist.php,v 1.6 2004/01/07 23:11:54 wez Exp $
 /* piece together a windows binary distro */
 
 $build_dir = $argv[1];
@@ -13,10 +13,8 @@
 
 $dist_dir = $build_dir . /php- . phpversion();
 @mkdir($dist_dir);
[EMAIL PROTECTED]($dist_dir/sapi);
 @mkdir($dist_dir/ext);
 @mkdir($dist_dir/dev);
[EMAIL PROTECTED]($dist_dir/dlls);
 @mkdir($dist_dir/extras);
 
 /* figure out additional DLL's that are required */
@@ -117,7 +115,7 @@
 function copy_text_file($source, $dest)
 {
$text = file_get_contents($source);
-   $text = str_replace(\n, \r\n, $text);
+   $text = preg_replace(/[^\r]\n$/, \r\n, $text);
$fp = fopen($dest, w);
fwrite($fp, $text);
fclose($fp);
@@ -136,7 +134,7 @@
copy($build_dir/$phppdb, $dist_dir/dev/$phppdb);
 }
 /* copy the sapi */
-copy_file_list($build_dir, $dist_dir/sapi, $sapi_targets);
+copy_file_list($build_dir, $dist_dir, $sapi_targets);
 
 /* copy the extensions */
 copy_file_list($build_dir, $dist_dir/ext, $ext_targets);
@@ -210,7 +208,7 @@
}
$dll = $tdll;
}
-   copy($dll, $dist_dir/dlls/ . basename($dll));
+   copy($dll, $dist_dir/ . basename($dll));
 }
 
 function copy_dir($source, $dest)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php