diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index b739360be7..977849c056 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -41,6 +41,14 @@ include $(XEN_ROOT)/tools/libs/libs.mk $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS) _paths.h +# 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. +$(LIB_OBJS) $(PIC_OBJS): libxlu_cfg_l.c libxlu_cfg_y.c libxlu_disk_l.c + %.c %.h:: %.y @rm -f $*.[ch] $(BISON) --output=$*.c $<