Skip to content

Commit

Permalink
implemented usage of the non core ext deps in phpize mode
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Jul 17, 2014
1 parent b3c6089 commit f0a1e41
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion win32/build/Makefile.phpize
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ _VC_MANIFEST_EMBED_EXE= if exist [email protected] $(MT) -nologo -manifest [email protected]
_VC_MANIFEST_EMBED_DLL= if exist [email protected] $(MT) -nologo -manifest [email protected] -outputresource:$@;2
!endif

install: build-headers
install: build-headers build-bins

22 changes: 20 additions & 2 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,14 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
ERROR("static " + extname + " cannot depend on shared " + dependson);
}

ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)");
ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib");
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib");
if (MODE_PHPIZE) {
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR_DEV)\\lib");
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR_DEV)\\lib\\php_" + dependson + ".lib");
} else {
ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)");
ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib");
}

} else {

Expand Down Expand Up @@ -1342,6 +1347,9 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
cflags = "/FI main/config.pickle.h " + cflags;
}
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
cflags = "/FI main/config.pickle.h " + cflags;
}
ADD_FLAG("CFLAGS_" + EXT, cflags);

if (PHP_DSP != "no") {
Expand Down Expand Up @@ -1940,6 +1948,16 @@ function generate_makefile()
}
}
MF.WriteLine(" @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(BUILD_DIR_DEV)\\include\\%D /y >nul");
if (MODE_PHPIZE) {
MF.WriteBlankLines(1);
MF.WriteLine("build-bins:");
for (var i in extensions_enabled) {
var lib = "php_" + extensions_enabled[i][0] + ".lib";
var dll = "php_" + extensions_enabled[i][0] + ".dll";
MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib\\" + lib);
//MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)\\" + dll);
}
}
TF.Close();

MF.WriteBlankLines(2);
Expand Down
1 change: 1 addition & 0 deletions win32/build/phpize.js.in
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ STDOUT.WriteLine(PHP_DIR);
C.WriteLine("/* This file automatically generated from script/confutils.js */");
C.WriteLine("var MODE_PHPIZE = true;");
C.WriteLine("var PHP_DIR = " + '"' + PHP_DIR.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
C.WriteLine("var PHP_PREFIX = " + '"' + PHP_PREFIX.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');

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

0 comments on commit f0a1e41

Please sign in to comment.