diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index e016baf888..c3b21875dc 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -40,6 +40,14 @@ include $(XEN_ROOT)/tools/libs/libs.mk $(OBJS-y) $(PIC_OBJS): $(AUTOINCS) +# Adding the .c conterparts of the headers generated by flex/bison as +# prerequisite of all objects. +# This is to tell make that if only the .c file is out-of-date but not the +# header, it should still wait for the .c file to be rebuilt. +# Otherwise, make doesn't considered "%.c %.h" as grouped targets, and will run +# the flex/bison rules in parallel of CC rules which only need the header. +$(OBJS-y) $(PIC_OBJS): libxlu_cfg_l.c libxlu_cfg_y.c libxlu_disk_l.c + %.c %.h:: %.y @rm -f $*.[ch] $(BISON) --output=$*.c $<