Skip to content

Commit f0a1e41

Browse files
committed
implemented usage of the non core ext deps in phpize mode
1 parent b3c6089 commit f0a1e41

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

win32/build/Makefile.phpize

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ _VC_MANIFEST_EMBED_EXE= if exist [email protected] $(MT) -nologo -manifest [email protected]
3434
_VC_MANIFEST_EMBED_DLL= if exist [email protected] $(MT) -nologo -manifest [email protected] -outputresource:$@;2
3535
!endif
3636

37-
install: build-headers
37+
install: build-headers build-bins
3838

win32/build/confutils.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,14 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
12011201
ERROR("static " + extname + " cannot depend on shared " + dependson);
12021202
}
12031203

1204-
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)");
12051204
ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib");
1206-
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib");
1205+
if (MODE_PHPIZE) {
1206+
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR_DEV)\\lib");
1207+
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR_DEV)\\lib\\php_" + dependson + ".lib");
1208+
} else {
1209+
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)");
1210+
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib");
1211+
}
12071212

12081213
} else {
12091214

@@ -1342,6 +1347,9 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
13421347
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
13431348
cflags = "/FI main/config.pickle.h " + cflags;
13441349
}
1350+
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
1351+
cflags = "/FI main/config.pickle.h " + cflags;
1352+
}
13451353
ADD_FLAG("CFLAGS_" + EXT, cflags);
13461354

13471355
if (PHP_DSP != "no") {
@@ -1940,6 +1948,16 @@ function generate_makefile()
19401948
}
19411949
}
19421950
MF.WriteLine(" @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(BUILD_DIR_DEV)\\include\\%D /y >nul");
1951+
if (MODE_PHPIZE) {
1952+
MF.WriteBlankLines(1);
1953+
MF.WriteLine("build-bins:");
1954+
for (var i in extensions_enabled) {
1955+
var lib = "php_" + extensions_enabled[i][0] + ".lib";
1956+
var dll = "php_" + extensions_enabled[i][0] + ".dll";
1957+
MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib\\" + lib);
1958+
//MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)\\" + dll);
1959+
}
1960+
}
19431961
TF.Close();
19441962

19451963
MF.WriteBlankLines(2);

win32/build/phpize.js.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ STDOUT.WriteLine(PHP_DIR);
208208
C.WriteLine("/* This file automatically generated from script/confutils.js */");
209209
C.WriteLine("var MODE_PHPIZE = true;");
210210
C.WriteLine("var PHP_DIR = " + '"' + PHP_DIR.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
211+
C.WriteLine("var PHP_PREFIX = " + '"' + PHP_PREFIX.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
211212

212213
C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js"));
213214
if (FSO.FileExists(PHP_DIR + "/script/ext_pickle.js")) {

0 commit comments

Comments
 (0)