Skip to content

Commit 4bbfa24

Browse files
committed
take the default manifest
yet to be reworked for the case some custom manifest were supplied
1 parent f17b732 commit 4bbfa24

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

win32/build/confutils.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,17 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
936936
return p;
937937
}
938938

939+
/* XXX check whether some manifest was originally supplied, otherwise keep using the default. */
940+
function generate_version_info_manifest(makefiletarget)
941+
{
942+
var manifest_name = makefiletarget + ".manifest";
943+
944+
MFO.WriteLine("$(BUILD_DIR)\\" + manifest_name + ": win32\\build\\default.manifest");
945+
MFO.WriteLine("\t@copy $(PHP_SRC_DIR)\\win32\\build\\default.manifest $(BUILD_DIR)\\" + makefiletarget + ".manifest");
946+
947+
return manifest_name;
948+
}
949+
939950
/* Emits rule to generate version info for a SAPI
940951
* or extension. Returns the name of the .res file
941952
* that will be generated */
@@ -1086,13 +1097,15 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
10861097

10871098
/* generate a .res file containing version information */
10881099
resname = generate_version_info_resource(makefiletarget, sapiname, configure_module_dirname, true);
1100+
1101+
manifest_name = generate_version_info_manifest(makefiletarget);
10891102

10901103
MFO.WriteLine(makefiletarget + ": $(BUILD_DIR)\\" + makefiletarget);
10911104
MFO.WriteLine("\t@echo SAPI " + sapiname_for_printing + " build complete");
10921105
if (MODE_PHPIZE) {
1093-
MFO.WriteLine("$(BUILD_DIR)\\" + makefiletarget + ": $(DEPS_" + SAPI + ") $(" + SAPI + "_GLOBAL_OBJS) $(PHPLIB) $(BUILD_DIR)\\" + resname);
1106+
MFO.WriteLine("$(BUILD_DIR)\\" + makefiletarget + ": $(DEPS_" + SAPI + ") $(" + SAPI + "_GLOBAL_OBJS) $(PHPLIB) $(BUILD_DIR)\\" + resname + " $(BUILD_DIR)\\" + manifest_name);
10941107
} else {
1095-
MFO.WriteLine("$(BUILD_DIR)\\" + makefiletarget + ": $(DEPS_" + SAPI + ") $(" + SAPI + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname);
1108+
MFO.WriteLine("$(BUILD_DIR)\\" + makefiletarget + ": $(DEPS_" + SAPI + ") $(" + SAPI + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname + " $(BUILD_DIR)\\" + manifest_name);
10961109
}
10971110

10981111
if (makefiletarget.match(new RegExp("\\.dll$"))) {
@@ -1303,6 +1316,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
13031316

13041317
var resname = generate_version_info_resource(dllname, extname, configure_module_dirname, false);
13051318
var ld = '@"$(LINK)"';
1319+
var manifest_name = generate_version_info_manifest(dllname);
13061320

13071321
ldflags = "";
13081322
if (is_pgo_desired(extname) && (PHP_PGI == "yes" || PHP_PGO != "no")) {
@@ -1322,10 +1336,10 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
13221336
MFO.WriteLine("$(BUILD_DIR)\\" + libname + ": $(BUILD_DIR)\\" + dllname);
13231337
MFO.WriteBlankLines(1);
13241338
if (MODE_PHPIZE) {
1325-
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(PHPLIB) $(BUILD_DIR)\\" + resname);
1339+
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(PHPLIB) $(BUILD_DIR)\\" + resname + " $(BUILD_DIR)\\" + manifest_name);
13261340
MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS_RESP) $(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")");
13271341
} else {
1328-
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname);
1342+
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname + " $(BUILD_DIR)\\" + manifest_name);
13291343
MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS_RESP) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /out:$(BUILD_DIR)\\" + dllname + ldflags + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")");
13301344
}
13311345
MFO.WriteLine("\t-@$(_VC_MANIFEST_EMBED_DLL)");

0 commit comments

Comments
 (0)