aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-12-20 12:32:41 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-12-20 12:32:41 +0200
commit0f5ce98342a7742c4e3af0dd33b5b642419d5286 (patch)
treef19f2f5aa9bca9f002827725c18541f709328dfa
parent8ecf1531d93acda9f904f11efb2a34dfec169153 (diff)
downloadfwd-0f5ce98342a7742c4e3af0dd33b5b642419d5286.tar.gz
fwd-0f5ce98342a7742c4e3af0dd33b5b642419d5286.zip
fix generated files in .gitignore
-rw-r--r--.gitignore4
-rw-r--r--gen/source.mk9
2 files changed, 11 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index f90a716..20d3be2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
deps.mk
docs/output
build
-gen
fwd
-!gen/source.mk
+gen/*.c
+gen/*.inc
!include/fwd
diff --git a/gen/source.mk b/gen/source.mk
new file mode 100644
index 0000000..55fe692
--- /dev/null
+++ b/gen/source.mk
@@ -0,0 +1,9 @@
+gen/gen_parser.c: src/parser.y gen/gen_lexer.inc
+ bison -Wcounterexamples -o gen/gen_parser.c src/parser.y
+
+gen/gen_lexer.inc: src/lexer.l
+ flex -o gen/gen_lexer.inc src/lexer.l
+
+build/gen/parser.o: gen/gen_parser.c
+ mkdir -p build/gen
+ $(COMPILE_FWD) $(SKIP_ANALYZER) -c gen/gen_parser.c -o build/gen/parser.o