com php-src: Pass explicit PHP version string to mkdist.php: win32/build/Makefile win32/build/mkdist.php

[email protected] (Anatol Belski)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    8121cb50465268d645a61f79a8bec4d144700b34
Author:    Anatol Belski <[email protected]>         Tue, 11 Apr 2017 16:20:42 +0200
Parents:   f052e99df6f4b3bc4e2a1e9717ee36339a33f33b
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=8121cb50465268d645a61f79a8bec4d144700b34

Log:
Pass explicit PHP version string to mkdist.php

Changed paths:
  M  win32/build/Makefile
  M  win32/build/mkdist.php


Diff:
diff --git a/win32/build/Makefile b/win32/build/Makefile
index cb2e95a..dcc2c02 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -186,7 +186,7 @@ build-dist: $(BUILD_DIR)\deplister.exe
 	-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
-	$(PHP_SDK_PHP_CMD) -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)"
+	$(PHP_SDK_PHP_CMD) -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php "$(PHP_VERSION_STRING)" "$(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 $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index ca99b0d..f97c49c 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -1,21 +1,22 @@
 <?php # $Id$
 /* piece together a windows binary distro */
 
-$build_dir = $argv[1];
-$php_build_dir = $argv[2];
-$phpdll = $argv[3];
-$sapi_targets = explode(" ", $argv[4]);
-$ext_targets = explode(" ", $argv[5]);
-$pecl_targets = explode(" ", $argv[6]);
-$snapshot_template = $argv[7];
+$php_version = $argv[1];
+$build_dir = $argv[2];
+$php_build_dir = $argv[3];
+$phpdll = $argv[4];
+$sapi_targets = explode(" ", $argv[5]);
+$ext_targets = explode(" ", $argv[6]);
+$pecl_targets = explode(" ", $argv[7]);
+$snapshot_template = $argv[8];
 
 $is_debug = preg_match("/^debug/i", $build_dir);
 
 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();
+$dist_dir = $build_dir . "/php-" . $php_version;
+$test_dir = $build_dir . "/php-test-pack-" . $php_version;
+$pecl_dir = $build_dir . "/pecl-" . $php_version;
 
 @mkdir($dist_dir);
 @mkdir("$dist_dir/ext");
@@ -258,12 +259,11 @@ foreach ($general_files as $src => $dest) {
 $branch = "HEAD"; // TODO - determine this from SVN branche name
 $fp = fopen("$dist_dir/snapshot.txt", "w");
 $now = date("r");
-$version = phpversion();
 fwrite($fp, <<<EOT
 This snapshot was automatically generated on
 $now
 
-Version: $version
+Version: $php_version
 Branch: $branch
 Build: $build_dir
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.