summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-06-30 18:39:43 -0400
committerOri Bernstein <ori@eigenstate.org>2012-06-30 18:39:43 -0400
commit9d6eed6e75156a78fbfad0cfaf8f616111a2b697 (patch)
tree551d73409d617cf619a3e06f45890b3a61f50035 /mk
parent63392c8127b2a8f39c907646870d469fbb0a15ca (diff)
downloadmc-9d6eed6e75156a78fbfad0cfaf8f616111a2b697.tar.gz
Override the default yacc rule for make.
This prevents yacc from being called multiple times.
Diffstat (limited to 'mk')
-rw-r--r--mk/lexyacc.mk6
1 files changed, 2 insertions, 4 deletions
diff --git a/mk/lexyacc.mk b/mk/lexyacc.mk
index 9d39bb4..db7c898 100644
--- a/mk/lexyacc.mk
+++ b/mk/lexyacc.mk
@@ -1,9 +1,7 @@
NECFLAGS = $(subst -Werror,,$(subst -Wall,,$(CFLAGS)))
-%.o: %.y
+%.c: %.y
yacc -dt -o$*.c $<
- $(CC) -c $(NECFLAGS) $*.c
-%.o: %.l
+%.c: %.l
flex -o$*.c $<
- $(CC) -c $(NECFLAGS) $*.c