summaryrefslogtreecommitdiff
path: root/mk/lexyacc.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
commit31d5350f573cf2b2c176082ae26de473ee1f885c (patch)
tree551d73409d617cf619a3e06f45890b3a61f50035 /mk/lexyacc.mk
parent5602844b7d3261133acdbf16462d91177338850f (diff)
downloadmc-31d5350f573cf2b2c176082ae26de473ee1f885c.tar.gz
Override the default yacc rule for make.
This prevents yacc from being called multiple times.
Diffstat (limited to 'mk/lexyacc.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