Skip to contentSkip to conversation

x86-64 don't generate dependency files when building compat headers

PATCH New Jan Beulich 1 participant 1 message Jan 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86-64 don't generate dependency files when building compat headers

The generated dependency files weren't correct (as their names get derived only from the base name of the target file, and there are public headers with the same base name in different directories), not needed (as the makefile already listed all necessary dependencies explicitly), and resulted in the first re-build in an already built tree to be an almost full re-build since the *.c files explicitly mentioned in the .*.d result in make not considering them as intermediate anymore, thus triggering re-generation of the headers, and hence re-building of almost the entire tree.

xen/include/Makefile +1 -1
@@ -51,7 +51,7 @@ compat/%.h: compat/%.i Makefile
 	mv -f [email protected] $@
 
 compat/%.i: compat/%.c Makefile
-	$(CPP) $(CFLAGS) $(cppflags-y) -o $@ $<
+	$(CPP) $(filter-out -M% .$(@F).d,$(CFLAGS)) $(cppflags-y) -o $@ $<
 
 compat/%.c: public/%.h xlat.lst Makefile
 	mkdir -p $(@D)