summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-12-11 22:18:10 (GMT)
committerPierre Joye <pajoye@php.net>2010-12-11 22:18:10 (GMT)
commita7ffa09e18137de43c91ac5f2120c170679baeae (patch)
treef2d77b2d2c9e738db96bdde27b87bf5796327be5 /win32
parent02ff4766c942985b73aa8932301fe7478a58c0ac (diff)
downloadphp-a7ffa09e18137de43c91ac5f2120c170679baeae.tar.gz
- add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the install-headers cmd
Diffstat (limited to 'win32')
-rw-r--r--win32/build/config.w322
-rw-r--r--win32/build/confutils.js39
-rw-r--r--win32/syslog.reg4
3 files changed, 34 insertions, 11 deletions
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index 6d93752..2eaa8b3 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -356,7 +356,7 @@ ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c
ADD_SOURCES("win32", "glob.c readdir.c \
registry.c select.c sendmail.c time.c winutil.c wsyslog.c globals.c");
-PHP_INSTALL_HEADERS("Zend/ TSRM/ include/ main/ main/streams/");
+PHP_INSTALL_HEADERS("", "Zend/ TSRM/ main/ main/streams/");
STDOUT.WriteBlankLines(1);
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 4fdbaac..9a00f55 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1631,6 +1631,18 @@ function generate_makefile()
var TF = FSO.OpenTextFile("win32/build/Makefile", 1);
MF.Write(TF.ReadAll());
+
+ MF.WriteLine("install-headers:");
+ MF.WriteLine(" @if not exist $(PHP_PREFIX)\\include mkdir $(PHP_PREFIX)\\include >nul");
+ MF.WriteLine(" @for %D in ($(INSTALL_HEADERS_DIR)) do @if not exist $(PHP_PREFIX)\\include\\%D mkdir $(PHP_PREFIX)\\include\\%D >nul");
+ for (i in headers_install) {
+ if (headers_install[i][2] != "") {
+ MF.WriteLine(" @if not exist $(PHP_PREFIX)\\include\\" + headers_install[i][2] + " mkdir $(PHP_PREFIX)\\include\\" +
+ headers_install[i][2] + ">nul");
+ MF.WriteLine(" @copy " + headers_install[i][0] + " " + "$(PHP_PREFIX)\\include\\" + headers_install[i][2] + " /y >nul");
+ }
+ }
+ MF.WriteLine(" @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(PHP_PREFIX)\\include\\%D /y >nul");
TF.Close();
MF.WriteBlankLines(2);
@@ -1851,25 +1863,36 @@ function _inner_glob(base, p, parts)
return items;
}
-function PHP_INSTALL_HEADERS(headers_list)
+function PHP_INSTALL_HEADERS(dir, headers_list)
{
headers_list = headers_list.split(new RegExp("\\s+"));
headers_list.sort();
+ if (dir.length > 0 && dir.substr(dir.length - 1) != '/') {
+ dir += '/';
+ }
+ dir = dir.replace(new RegExp("/", "g"), "\\");
for (i in headers_list) {
src = headers_list[i];
src = src.replace(new RegExp("/", "g"), "\\");
- isdir = FSO.FolderExists(src);
- isfile = FSO.FileExists(src);
+ isdir = FSO.FolderExists(dir + src);
+ isfile = FSO.FileExists(dir + src);
if (isdir) {
- headers_install[headers_install.length] = [src, 'dir'];
- ADD_FLAG("INSTALL_HEADERS_DIR", src);
+ if (src.length > 0 && src.substr(src.length - 1) != '/') {
+ src += '\\';
+ }
+ headers_install[headers_install.length] = [dir + src, 'dir',''];
+ ADD_FLAG("INSTALL_HEADERS_DIR", dir + src);
} else if (isfile) {
- headers_install[headers_install.length] = [src, 'file'];
- ADD_FLAG("INSTALL_HEADERS", src);
+ dirname = FSO.GetParentFolderName(dir + src);
+ headers_install[headers_install.length] = [dir + src, 'file', dirname];
+ ADD_FLAG("INSTALL_HEADERS", dir + src);
+ } else {
+ STDOUT.WriteLine(headers_list);
+ ERROR("Cannot find header " + dir + src);
}
}
- output_as_table(["Headers", "Type"], headers_install);
+ output_as_table(["Headers", "Type", "target"], headers_install);
}
// for snapshot builders, this option will attempt to enable everything
diff --git a/win32/syslog.reg b/win32/syslog.reg
index 2baa88e..4d3e273 100644
--- a/win32/syslog.reg
+++ b/win32/syslog.reg
@@ -1,5 +1,5 @@
REGEDIT4
-[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\PHP-5.1.0-dev]
+[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\PHP-5.3.99-dev]
"TypesSupported"=dword:00000007
-"EventMessageFile"="C:\\php5\\php5ts.dll"
+"EventMessageFile"="g:\\test\\srcinstall6\\php5ts_debug.dll"