Skip to content

Commit 9313dd4

Browse files
committed
Make output a bit nicer
1 parent 1afde5f commit 9313dd4

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

win32/build/build.ninja

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,23 @@ build Zend\zend_ini_parser.c: bison_php Zend\zend_ini_parser.y
3434
build Zend\zend_language_parser.c: bison_php Zend\zend_language_parser.y
3535
build sapi\phpdbg\phpdbg_parser.c: bison_php sapi\phpdbg\phpdbg_parser.y
3636

37-
rule re2c1
37+
rule re2c_php_ini
3838
command = ${RE2C} ${RE2C_FLAGS} --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l
39+
description = re2c $in
3940

40-
build Zend\zend_ini_scanner.c Zend\zend_ini_scanner_defs.h: re2c1 Zend\zend_ini_scanner.l
41+
build Zend\zend_ini_scanner.c | Zend\zend_ini_scanner_defs.h: re2c_php_ini Zend\zend_ini_scanner.l
4142

42-
rule re2c2
43+
rule re2c_php_language
4344
command = ${RE2C} ${RE2C_FLAGS} --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l
45+
description = re2c $in
4446

45-
build Zend\zend_language_scanner.c Zend\zend_language_scanner_defs.h: re2c2 Zend\zend_language_scanner.l
47+
build Zend\zend_language_scanner.c Zend\zend_language_scanner_defs.h: re2c_php_language Zend\zend_language_scanner.l
4648

47-
rule re2c3
49+
rule re2c_phpdbg
4850
command = ${RE2C} ${RE2C_FLAGS} -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l
51+
description = re2c $in
4952

50-
build sapi\phpdbg\phpdbg_lexer.c: re2c3 sapi\phpdbg\phpdbg_lexer.l
53+
build sapi\phpdbg\phpdbg_lexer.c: re2c_phpdbg sapi\phpdbg\phpdbg_lexer.l
5154

5255
rule mc_php
5356
command = ${MC} -h win32\ -r ${BUILD_DIR}\ -x ${BUILD_DIR}\ $in

win32/build/config.w32

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ MFO.WriteLine('\t$(PHP_ASSEMBLER) $(FIBER_ASM_FLAGS) $(BUILD_DIR)\\Zend\\make_$(
277277

278278
NFO.WriteBlankLines(1);
279279
NFO.WriteLine('rule as_fiber');
280-
NFO.WriteLine(' command = ${PHP_ASSEMBLER} ${FIBER_ASM_FLAGS} $out $in');
280+
NFO.WriteLine(' command = cmd /c ${PHP_ASSEMBLER} ${FIBER_ASM_FLAGS} $out $in > NUL');
281+
NFO.WriteLine(' description = as $in');
281282
NFO.WriteBlankLines(1);
282283
NFO.WriteLine('build ${BUILD_DIR}\\Zend\\jump_' + FIBER_ASM_ABI + '.obj: as_fiber Zend\\asm\\jump_' + FIBER_ASM_ABI + '.asm');
283284
NFO.WriteLine('build ${BUILD_DIR}\\Zend\\make_' + FIBER_ASM_ABI + '.obj: as_fiber Zend\\asm\\make_' + FIBER_ASM_ABI + '.asm');

win32/build/confutils.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,7 @@ function generate_version_info_resource(makefiletarget, basename, creditspath, s
11781178
+ makefiletarget + '\\"" /d URL="\\"' + project_url +
11791179
'\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
11801180
'\\"" /d THANKS_GUYS="\\"' + thanks + '\\"" win32\\build\\template.rc');
1181+
NFO.WriteLine(" description = rc $in");
11811182
NFO.WriteBlankLines(1);
11821183
NFO.WriteLine("build ${BUILD_DIR}\\" + resname + ": rc_" + basename + " win32\\build\\template.rc");
11831184
}
@@ -1300,20 +1301,19 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
13001301
if (ld) {
13011302
MFO.WriteLine("\t" + ld + " /nologo /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(" + SAPI + "_GLOBAL_OBJS_RESP) $(BUILD_DIR)\\$(PHPLIB) $(ARFLAGS_" + SAPI + ") $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname);
13021303
NFO.WriteLine("rule ar_" + sapiname);
1303-
NFO.WriteLine(" command = " + "${MAKE_LIB}" + " /nologo /out:${BUILD_DIR}\\" + makefiletarget + " " + ldflags.replace(/\$\(([a-zA-Z0-9_]+)\)/g, "${$1}") + " ${" + SAPI + "_GLOBAL_OBJS_RESP} ${BUILD_DIR}\\${PHPLIB} ${ARFLAGS_" + SAPI + "} ${LIBS_" + SAPI + "} ${BUILD_DIR}\\" + resname);
1304+
NFO.WriteLine(" command = ${MAKE_LIB} /nologo /out:${BUILD_DIR}\\" + makefiletarget + " " + ldflags.replace(/\$\(([a-zA-Z0-9_]+)\)/g, "${$1}") + " ${" + SAPI + "_GLOBAL_OBJS_RESP} ${BUILD_DIR}\\${PHPLIB} ${ARFLAGS_" + SAPI + "} ${LIBS_" + SAPI + "} ${BUILD_DIR}\\" + resname);
1305+
NFO.WriteLine(" description = ar " + makefiletarget);
13041306
} else {
13051307
ld = CMD_MOD1 + '"$(LINK)"';
13061308
MFO.WriteLine("\t" + ld + " /nologo " + " $(" + SAPI + "_GLOBAL_OBJS_RESP) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname + " /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(LDFLAGS_" + SAPI + ")");
13071309
NFO.WriteLine("rule ld_" + sapiname);
1308-
NFO.WriteLine(" command = " + "${LD}" + " /nologo " + " ${" + SAPI + "_GLOBAL_OBJS_RESP} ${BUILD_DIR}\\${PHPLIB} ${LIBS_" + SAPI + "} ${BUILD_DIR}\\" + resname + " /out:${BUILD_DIR}\\" + makefiletarget + " " + ldflags.replace(/\$\(([a-zA-Z0-9_]+)\)/g, "${$1}") + " ${LDFLAGS_" + SAPI + "}");
1310+
NFO.WriteLine(" command = ${LD} /nologo ${" + SAPI + "_GLOBAL_OBJS_RESP} ${BUILD_DIR}\\${PHPLIB} ${LIBS_" + SAPI + "} ${BUILD_DIR}\\" + resname + " /out:${BUILD_DIR}\\" + makefiletarget + " " + ldflags.replace(/\$\(([a-zA-Z0-9_]+)\)/g, "${$1}") + " ${LDFLAGS_" + SAPI + "}");
1311+
NFO.WriteLine(" description = ld " + makefiletarget);
13091312
}
13101313
}
13111314

13121315
if (!MODE_PHPIZE) {
1313-
ninja.globals[SAPI] = "build ${BUILD_DIR}\\" + makefiletarget + ": " + (is_lib ? "ar_" : "ld_") + sapiname;
1314-
ninja.globals[SAPI] += " " + "${DEPS_" + SAPI + "}";
1315-
ninja.globals[SAPI] += " ${" + SAPI + "_GLOBAL_OBJS}";
1316-
ninja.globals[SAPI] += " ${BUILD_DIR}\\${PHPLIB} ${BUILD_DIR}\\" + resname;
1316+
ninja.globals[SAPI] = "build ${BUILD_DIR}\\" + makefiletarget + ": " + (is_lib ? "ar_" : "ld_") + sapiname + " ${DEPS_" + SAPI + "} ${" + SAPI + "_GLOBAL_OBJS} ${BUILD_DIR}\\${PHPLIB} ${BUILD_DIR}\\" + resname;
13171317
}
13181318

13191319
if (manifest) {
@@ -1521,6 +1521,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
15211521
NFO.WriteLine("# " + dllname + " DLL stuff here");
15221522
NFO.WriteLine("rule ld_" + EXT.toLowerCase());
15231523
NFO.WriteLine(" command = ${LD} ${" + EXT + "_GLOBAL_OBJS_RESP} ${BUILD_DIR}\\${PHPLIB} ${LIBS_" + EXT + "} ${LIBS} ${BUILD_DIR}\\" + resname + " /out:${BUILD_DIR}\\" + dllname + ldflags + " ${DLL_LDFLAGS} ${LDFLAGS} ${LDFLAGS_" + EXT + "}");
1524+
NFO.WriteLine(" description = ld $out");
15241525
NFO.WriteBlankLines(1);
15251526
ninja.globals[EXT] = "build ${BUILD_DIR}\\" + dllname + " | ${BUILD_DIR}\\" + libname + ": ld_" + EXT.toLowerCase() + " ${DEPS_" + EXT + "} ${" + EXT + "_GLOBAL_OBJS} ${BUILD_DIR}\\${PHPLIB} ${BUILD_DIR}\\" + resname;
15261527
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname + " $(BUILD_DIR)\\" + manifest_name);
@@ -1787,9 +1788,9 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
17871788
if (typeof ninja.rules[rulename] === "undefined") {
17881789
ninja.rules[rulename] = true;
17891790
NFO.WriteLine("rule " + rulename);
1790-
NFO.WriteLine(" command = " + "${CC} ${" + flags + "} ${CFLAGS} ${" + bd_flags_name + "} /showIncludes /FS /c $in /Fo$out");
1791+
NFO.WriteLine(" command = ${CC} ${" + flags + "} ${CFLAGS} ${" + bd_flags_name + "} /showIncludes /FS /c $in /Fo$out");
17911792
NFO.WriteLine(" deps = msvc");
1792-
NFO.WriteLine(" description = CC $out");
1793+
NFO.WriteLine(" description = cc $in");
17931794
NFO.WriteBlankLines(1);
17941795
}
17951796
NFO.WriteLine(nfo_builds.join("\n"));
@@ -2886,7 +2887,7 @@ MF.WriteLine("# CMB");
28862887
MF.WriteBlankLines(1);
28872888
line = configure_subst.Item("PHP_DLL_DEF_SOURCES");
28882889
MF.WriteLine("rule cat");
2889-
MF.WriteLine(" command = cmd /c type " + line + " > ${BUILD_DIR}\\${PHPDLL}.def");
2890+
MF.WriteLine(" command = cmd /c copy " + line.replace(/\s+/g, "+") + " ${BUILD_DIR}\\${PHPDLL}.def > NUL");
28902891
MF.WriteBlankLines(1);
28912892
MF.WriteLine("build ${BUILD_DIR}\\${PHPDLL}.def: cat " + line);
28922893
for (ext in ninja.globals) {

0 commit comments

Comments
 (0)