summaryrefslogtreecommitdiff
path: root/chapter06/docs
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2024-06-21 12:58:51 -0700
committerGitHub <noreply@github.com>2024-06-21 20:58:51 +0100
commitfd8442075faa603b3956d51d81486424624c5355 (patch)
tree029c1afb736ff0e350c2b032318e5fc376c7e1e4 /chapter06/docs
parente5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4 (diff)
downloadSimple-fd8442075faa603b3956d51d81486424624c5355.tar.gz
Simple-fd8442075faa603b3956d51d81486424624c5355.zip
Backport tests (#87)
* Fix unexpected number parse errors * Add chapter titles * Split test files by chapter * Backport rename Fuzzer08Test to FuzzerWrap * Replace graph build scripts with Makefile * Backport Chapter05Test.testRegress1 * Backport require space after 'return' * Backport check EOF after return statement
Diffstat (limited to 'chapter06/docs')
-rw-r--r--chapter06/docs/Makefile12
-rw-r--r--chapter06/docs/build-graphs.sh12
2 files changed, 12 insertions, 12 deletions
diff --git a/chapter06/docs/Makefile b/chapter06/docs/Makefile
new file mode 100644
index 00000000..12659b8f
--- /dev/null
+++ b/chapter06/docs/Makefile
@@ -0,0 +1,12 @@
+GV := $(wildcard *.gv)
+SVG := $(patsubst %.gv,%.svg,$(GV))
+
+.PHONY: all
+all: $(SVG)
+
+%.svg: %.gv
+ dot -Tsvg $< > $@
+
+.PHONY: clean
+clean:
+ @rm -f $(SVG)
diff --git a/chapter06/docs/build-graphs.sh b/chapter06/docs/build-graphs.sh
deleted file mode 100644
index 6b3f5bb2..00000000
--- a/chapter06/docs/build-graphs.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-dot -Tsvg 06-graph1-pre.gv > 06-graph1-pre.svg
-dot -Tsvg 06-graph1-post.gv > 06-graph1-post.svg
-dot -Tsvg 06-graph2-pre.gv > 06-graph2-pre.svg
-dot -Tsvg 06-graph2-post.gv > 06-graph2-post.svg
-dot -Tsvg 06-graph3-nonconst.gv > 06-graph3-nonconst.svg
-dot -Tsvg 06-graph3-nonconst-peephole.gv > 06-graph3-nonconst-peephole.svg
-dot -Tsvg 06-graph3-true.gv > 06-graph3-true.svg
-dot -Tsvg 06-graph3-false.gv > 06-graph3-false.svg
-dot -Tsvg 06-graph4-nonconst.gv > 06-graph4-nonconst.svg
-dot -Tsvg 06-graph4-true.gv > 06-graph4-true.svg
-dot -Tsvg 06-graph4-arg2.gv > 06-graph4-arg2.svg
-dot -Tsvg lattice.gv > lattice.svg