diff --git a/.gitignore b/.gitignore index 1a64333..c78a970 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /nim.cfg +*.dot *.html *.run +*.svg diff --git a/src/preserves/Tupfile b/src/preserves/Tupfile index 84f7fb2..6aa3765 100644 --- a/src/preserves/Tupfile +++ b/src/preserves/Tupfile @@ -1,4 +1,8 @@ include_rules NIM_FLAGS += --path:$(TUP_CWD)/.. -: foreach preserves_schema_nim.nim schemac.nim schemaparse.nim |> !nim_bin |> $(BIN_DIR)/%B | $(BIN_DIR)/<%B> +: foreach preserves_schema_nim.nim schemaparse.nim |> !nim_bin |> $(BIN_DIR)/%B | $(BIN_DIR)/<%B> : foreach *hooks.nim |> !nim_check |> + +DOT_FILES = ../../Document.dot ../../Schema.dot +: schemac.nim |> !nim_bin |> $(BIN_DIR)/%B | $(DOT_FILES) $(BIN_DIR)/<%B> +: foreach $(DOT_FILES) |> dot -Tsvg -LO %f > %o |> ../../%B-Grammer-Graph.svg diff --git a/src/preserves/schemac.nim.cfg b/src/preserves/schemac.nim.cfg new file mode 100644 index 0000000..661ff6d --- /dev/null +++ b/src/preserves/schemac.nim.cfg @@ -0,0 +1 @@ +d:npegDotDir:"../.."