makefile: parser/lexer also depend on header files

This commit is contained in:
Michael Stapelberg 2010-02-13 19:27:28 +01:00
parent 79a4e30488
commit 01297af20a
1 changed files with 2 additions and 2 deletions

View File

@ -44,12 +44,12 @@ loglevels.h:
done; \
echo "};") > include/loglevels.h;
src/cfgparse.yy.o: src/cfgparse.l
src/cfgparse.yy.o: src/cfgparse.l ${HEADERS}
echo "LEX $<"
flex -i -o$(@:.o=.c) $<
$(CC) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
src/cfgparse.y.o: src/cfgparse.y
src/cfgparse.y.o: src/cfgparse.y ${HEADERS}
echo "YACC $<"
bison --debug --verbose -b $(basename $< .y) -d $<
$(CC) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)