a7bb4ec4b1
- In share/debug.c, undo my mistake in commit 9037d13
by changing
vfprintf back to fprintf in OUTTRACE.
- In ud/ud.c, move the trace output from stdout to stderr, because
stdout has ego's output file, which becomes opt2's input file. If
trace output goes to stdout, it gets prepended to the output file,
and opt2 errors with "wrong input file".
I also edit both build.lua files so ego depends on its header files;
this part isn't needed for -DTRACE.
One can now use -DTRACE by adding it to the cflags in both build.lua
files.
61 lines
893 B
Lua
61 lines
893 B
Lua
cprogram {
|
|
name = "makecldef",
|
|
srcs = { "./makecldef.c" }
|
|
}
|
|
|
|
normalrule {
|
|
name = "classdefs_h",
|
|
ins = {
|
|
"+makecldef",
|
|
matching(filenamesof("modules/src/em_data+lib"), "em_mnem%.h$"),
|
|
"./cldefs.src"
|
|
},
|
|
outleaves = { "classdefs.h" },
|
|
commands = {
|
|
"%{ins} > %{outs}"
|
|
}
|
|
}
|
|
|
|
normalrule {
|
|
name = "pop_push_h",
|
|
ins = {
|
|
"./pop_push.awk",
|
|
"h/em_table",
|
|
},
|
|
outleaves = { "pop_push.h" },
|
|
commands = {
|
|
"awk -f %{ins[1]} < %{ins[2]} > %{outs}"
|
|
}
|
|
}
|
|
|
|
clibrary {
|
|
name = "lib",
|
|
srcs = {
|
|
"./debug.c",
|
|
"./global.c",
|
|
"./files.c",
|
|
"./go.c",
|
|
"./map.c",
|
|
"./aux.c",
|
|
"./get.c",
|
|
"./put.c",
|
|
"./alloc.c",
|
|
"./lset.c",
|
|
"./cset.c",
|
|
"./parser.c",
|
|
"./stack_chg.c",
|
|
"./locals.c",
|
|
"./init_glob.c",
|
|
},
|
|
deps = {
|
|
"./*.h",
|
|
"+classdefs_h",
|
|
"+pop_push_h",
|
|
"h+emheaders",
|
|
"modules/src/em_data+lib",
|
|
},
|
|
vars = {
|
|
["+cflags"] = {"-DVERBOSE", "-DNOTCOMPACT"}
|
|
}
|
|
}
|