Add ACK target util/LLgen+bootstrap
The ACK builds an internal LLgen without installing it. The new target would rebuild LLgen's own parser using the ACK's internal LLgen. Keep bootstrap.sh, which uses an installed LLgen. The new target is more convenient for those who build the ACK but don't build and install a separate LLgen.
This commit is contained in:
parent
9cee18f9d6
commit
eb520a343d
|
@ -6,9 +6,9 @@ clibrary {
|
||||||
cprogram {
|
cprogram {
|
||||||
name = "llgen",
|
name = "llgen",
|
||||||
|
|
||||||
-- These use pre-LLgen'd versions of LLgen.c, Lpars.c and tokens.c. If
|
-- These use pre-LLgen'd versions of LLgen.c, Lpars.c, Lpars.h, and
|
||||||
-- LLgen.g gets updated, they need rebuilding. Use the bootstrap script to
|
-- tokens.c. If LLgen.g or tokens.g gets updated, they need
|
||||||
-- do this.
|
-- rebuilding. Use the bootstrap target to do this.
|
||||||
|
|
||||||
srcs = { "./src/*.c" },
|
srcs = { "./src/*.c" },
|
||||||
deps = { "+headers" },
|
deps = { "+headers" },
|
||||||
|
@ -20,6 +20,20 @@ cprogram {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- This bootstrap target rebuilds LLgen's own parser with LLgen.
|
||||||
|
-- It acts like ./bootstrap.sh but without installing LLgen in PATH.
|
||||||
|
normalrule {
|
||||||
|
name = "bootstrap",
|
||||||
|
ins = "+llgen",
|
||||||
|
outleaves = { "phony" },
|
||||||
|
commands = {
|
||||||
|
"cd %{abspath(cwd()..\"/src\")}",
|
||||||
|
"%{abspath(ins)} -vvv -x tokens.g LLgen.g",
|
||||||
|
"echo",
|
||||||
|
"echo You should now be able to rebuild LLgen with the new parser.",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
definerule("llgen",
|
definerule("llgen",
|
||||||
{
|
{
|
||||||
srcs = { type="targets" },
|
srcs = { type="targets" },
|
||||||
|
|
Loading…
Reference in a new issue