Skip to contentSkip to conversation

qemu: fix incremental rebuild

PATCH New Jan Beulich 1 participant 1 message Oct 22, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu: fix incremental rebuild

While the .*.d dependency files get build nicely during the initial build, they never got actually used: make's $(wildcard ) function acts like the shell's, i.e. *.d doesn't match any file name starting with '.' and hence none of the files would ever be used.

For the clean: rules the issue is the same, except here it should have been very obvious that removing *.d won't do what was intended.

Makefile +3 -3
@@ -203,8 +203,8 @@ qemu-img$(EXESUF) qemu-nbd$(EXESUF): LIB
 clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
-	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
-	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d
+	rm -f *.o .*.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
+	rm -f slirp/*.o slirp/.*.d audio/*.o audio/.*.d
 	$(MAKE) -C tests clean
 	for d in $(TARGET_DIRS); do \
 	$(MAKE) -C $$d $@ || exit 1 ; \
@@ -369,4 +369,4 @@ tarbin:
 	$(mandir)/man8/qemu-nbd.8
 
 # Include automatically generated dependency files
--include $(wildcard *.d audio/*.d slirp/*.d)
+-include $(wildcard .*.d audio/.*.d slirp/.*.d)
Makefile.target +2 -2
@@ -750,7 +750,7 @@ endif
 
 clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
-	rm -f *.d */*.d tcg/*.o
+	rm -f .*.d */.*.d tcg/*.o
 
 install: all install-hook
 ifneq ($(PROGS),)
@@ -758,4 +758,4 @@ ifneq ($(PROGS),)
 endif
 
 # Include automatically generated dependency files
--include $(wildcard *.d */*.d)
+-include $(wildcard .*.d */.*.d)

While the .*.d dependency files get build nicely during the initial build, they never got actually used: make's $(wildcard ) function acts like the shell's, i.e. *.d doesn't match any file name starting with '.' and hence none of the files would ever be used.

For the clean: rules the issue is the same, except here it should have been very obvious that removing *.d won't do what was intended.

Makefile +3 -3
@@ -203,8 +203,8 @@ qemu-img$(EXESUF) qemu-nbd$(EXESUF): LIB
 clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
-	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
-	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d
+	rm -f *.o .*.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
+	rm -f slirp/*.o slirp/.*.d audio/*.o audio/.*.d
 	$(MAKE) -C tests clean
 	for d in $(TARGET_DIRS); do \
 	$(MAKE) -C $$d $@ || exit 1 ; \
@@ -369,4 +369,4 @@ tarbin:
 	$(mandir)/man8/qemu-nbd.8
 
 # Include automatically generated dependency files
--include $(wildcard *.d audio/*.d slirp/*.d)
+-include $(wildcard .*.d audio/.*.d slirp/.*.d)
Makefile.target +2 -2
@@ -750,7 +750,7 @@ endif
 
 clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
-	rm -f *.d */*.d tcg/*.o
+	rm -f .*.d */.*.d tcg/*.o
 
 install: all install-hook
 ifneq ($(PROGS),)
@@ -758,4 +758,4 @@ ifneq ($(PROGS),)
 endif
 
 # Include automatically generated dependency files
--include $(wildcard *.d */*.d)
+-include $(wildcard .*.d */.*.d)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel