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 {
|
||||
name = "llgen",
|
||||
|
||||
-- These use pre-LLgen'd versions of LLgen.c, Lpars.c and tokens.c. If
|
||||
-- LLgen.g gets updated, they need rebuilding. Use the bootstrap script to
|
||||
-- do this.
|
||||
-- These use pre-LLgen'd versions of LLgen.c, Lpars.c, Lpars.h, and
|
||||
-- tokens.c. If LLgen.g or tokens.g gets updated, they need
|
||||
-- rebuilding. Use the bootstrap target to do this.
|
||||
|
||||
srcs = { "./src/*.c" },
|
||||
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",
|
||||
{
|
||||
srcs = { type="targets" },
|
||||
|
|
Loading…
Reference in a new issue