From: Michael Stapelberg Date: Sun, 20 Dec 2009 11:58:45 +0000 (+0100) Subject: makefile: properly document dependencies on each target to fix parallel make (Thanks... X-Git-Tag: 3.e~6^2~195 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1776c12c0b03c6e737650f9e63f33bd774475cd6;p=i3%2Fi3 makefile: properly document dependencies on each target to fix parallel make (Thanks Atsutane) --- diff --git a/Makefile b/Makefile index ffae7baf..c83fe094 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FILES:=$(FILES:.c=.o) HEADERS:=$(filter-out include/loglevels.h,$(wildcard include/*.h)) # Depend on the specific file (.c for each .o) and on all headers -src/%.o: src/%.c ${HEADERS} +src/%.o: src/%.c ${HEADERS} loglevels.h echo "CC $<" $(CC) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/$(shell basename $< .c)/ { print NR }' loglevels.tmp))" -c -o $@ $< @@ -37,12 +37,12 @@ loglevels.h: rm_loglevels done; \ echo "};") > include/loglevels.h -src/cfgparse.yy.o: src/cfgparse.l +src/cfgparse.yy.o: src/cfgparse.l loglevels.h 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 loglevels.h 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)