From 1776c12c0b03c6e737650f9e63f33bd774475cd6 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 20 Dec 2009 12:58:45 +0100 Subject: [PATCH] makefile: properly document dependencies on each target to fix parallel make (Thanks Atsutane) --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.39.5