aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-08 23:51:33 +0100
committerDuncaen <mail@duncano.de>2017-03-08 23:51:33 +0100
commitbf6f00af6559cbd30509baa5d4bd72c07560835a (patch)
treecbd9ee542a93a161d9f0ff236d6162792fbade8f
parent8075444f49d822ddec4e2020b2b93a833ac63790 (diff)
downloadlobase-bf6f00af6559cbd30509baa5d4bd72c07560835a.tar.gz
mk: fix parallel yacc targets
-rw-r--r--mk/bsd.lib.mk7
-rw-r--r--mk/bsd.prog.mk9
2 files changed, 10 insertions, 6 deletions
diff --git a/mk/bsd.lib.mk b/mk/bsd.lib.mk
index 2b9c922..27be04b 100644
--- a/mk/bsd.lib.mk
+++ b/mk/bsd.lib.mk
@@ -33,9 +33,12 @@ y.tab.h y.tab.c: $(YFILES)
@echo $(YACC) -d $(^F)
@$(YACC) -d $^
+$(YFILES:.y=.c): y.tab.c
+ @cp -f y.tab.c $@
+
%.c: %.l
- @echo "$(LEX) $(<F) > $(@F)"
- @$(LEX) -t $< > $@
+ @echo "$(LEX) -t $(LFLAGS) $(<F) > $(@F)"
+ @$(LEX) -t $(LFLAGS) $< > $@
%.o: %.c
@echo $(CC) -c $(CFLAGS) $(<F)
diff --git a/mk/bsd.prog.mk b/mk/bsd.prog.mk
index 8ed90b5..bc886e8 100644
--- a/mk/bsd.prog.mk
+++ b/mk/bsd.prog.mk
@@ -37,15 +37,16 @@ else
$(PROG) : % : %.o
endif
-$(LFILES:.l=.o) : %.o : %.c
-
-y.tab.h y.tab.c: $(YFILES)
+y.tab.c y.tab.h: $(YFILES)
@echo $(YACC) -d $(^F)
@$(YACC) -d $^
+$(YFILES:.y=.c): y.tab.c
+ @cp -f y.tab.c $@
+
%.c: %.l
@echo "$(LEX) -t $(LFLAGS) $(<F) > $(@F)"
- $(LEX) -t $(LFLAGS) $< > $@
+ @$(LEX) -t $(LFLAGS) $< > $@
%.o: %.c
@echo $(CC) -c $(CFLAGS) $(<F)