mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
implement makefile fragment support for nmake
This commit is contained in:
parent
a055ab76c7
commit
defd45adc2
3 changed files with 43 additions and 0 deletions
|
@ -44,6 +44,8 @@ var PHP_TEST_INI_PATH = "";
|
|||
var PHP_TEST_INI = "";
|
||||
var PHP_TEST_INI_EXT_EXCLUDE = "";
|
||||
|
||||
var PHP_MAKEFILE_FRAGMENTS = PHP_SRC_DIR + "\\Makefile.fragments.w32";
|
||||
|
||||
/* Care also about NTDDI_VERSION and _WIN32_WINNT in config.w32.h.in */
|
||||
var WINVER = "0x0601"; /* 7/2008r2 */
|
||||
|
||||
|
@ -2474,6 +2476,17 @@ function generate_makefile()
|
|||
MF.Write(TF.ReadAll());
|
||||
}
|
||||
TF.Close();
|
||||
MF.WriteBlankLines(2);
|
||||
|
||||
if (FSO.FileExists(PHP_MAKEFILE_FRAGMENTS)) {
|
||||
TF = FSO.OpenTextFile(PHP_MAKEFILE_FRAGMENTS, 1);
|
||||
if (!TF.AtEndOfStream) {
|
||||
MF.Write(TF.ReadAll());
|
||||
}
|
||||
TF.Close();
|
||||
MF.WriteBlankLines(2);
|
||||
FSO.DeleteFile(PHP_MAKEFILE_FRAGMENTS, true);
|
||||
}
|
||||
|
||||
MF.Close();
|
||||
}
|
||||
|
@ -3273,3 +3286,24 @@ function force_all_shared()
|
|||
return !!PHP_ALL_SHARED && "yes" == PHP_ALL_SHARED;
|
||||
}
|
||||
|
||||
function ADD_MAKEFILE_FRAGMENT()
|
||||
{
|
||||
var fn_in = configure_module_dirname + "\\Makefile.frag.w32";
|
||||
if (FSO.FileExists(fn_in)) {
|
||||
var h_in, h_out;
|
||||
var create_out_fl = !FSO.FileExists(PHP_MAKEFILE_FRAGMENTS);
|
||||
var open_flags = create_out_fl ? 8 : 2;
|
||||
|
||||
h_in = FSO.OpenTextFile(fn_in, 1);
|
||||
h_out = FSO.OpenTextFile(PHP_MAKEFILE_FRAGMENTS, open_flags, create_out_fl);
|
||||
|
||||
if (!TF.AtEndOfStream) {
|
||||
h_out.Write(h_in.ReadAll());
|
||||
h_out.WriteBlankLines(1);
|
||||
}
|
||||
|
||||
h_in.Close();
|
||||
h_out.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue