Skip to content
Snippets Groups Projects
Commit b240076b authored by benjamin.franksen's avatar benjamin.franksen
Browse files

snc: fixed rules for generating parser and lexer

With parallel make (-j) the snl.c and snl.h targets were built
twice which could cause building to fail. With the changed rules
I ran into a make bug and had to add an empty recipy where it
should not be needed. Also needed to work around a bug in the base
rules (no explicit rule exists that generates the .d files).
parent f9f2629b
No related branches found
No related tags found
No related merge requests found
...@@ -46,15 +46,21 @@ include $(TOP)/configure/RULES ...@@ -46,15 +46,21 @@ include $(TOP)/configure/RULES
vpath %.lem .. vpath %.lem ..
vpath %.lt .. vpath %.lt ..
snl.c snl.h: snl.lem snl.lt $(LEMON) snl.c: snl.lem snl.lt $(LEMON)
$(RM) $@ $(RM) snl.c snl.h
$(LEMON) o=. $< $(LEMON) o=. $<
snl.h: snl.c
# empty recipy needed to work around make bug #35455
vpath %.re .. vpath %.re ..
lexer.c: snl.re snl.h lexer.c: snl.re
$(RE2C) -s -b -o $@ $< $(RE2C) -s -b -o $@ $<
# work around bug in base rules
lexer.o: snl.h
$(COMMON_DIR)/snl.bnf: snl.lem $(COMMON_DIR)/snl.bnf: snl.lem
$(RM) $@ $(RM) $@
$(LEMON) o=. -g $< > $@.tmp $(LEMON) o=. -g $< > $@.tmp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment