fix make clean targets
authorMagnus Damm <damm@opensource.se>
Fri, 13 Nov 2009 09:51:05 +0000 (18:51 +0900)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 14 Nov 2009 00:23:02 +0000 (01:23 +0100)
This patch fixes clean in case of missing directories and
also adds code to distclean that removes the following files:
 qemu-monitor.texi roms/seabios/config.mak roms/vgabios/config.mak

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Makefile

index 7be0a15dbdd97cfe34734ff0ab69c06b4f79f902..fe5d868e58c6c6133a153ebadb751481b1c00124 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -237,12 +237,13 @@ clean:
        rm -f qemu-img-cmds.h
        $(MAKE) -C tests clean
        for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
-       $(MAKE) -C $$d $@ || exit 1 ; \
+       if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
         done
 
 distclean: clean
-       rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
+       rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
        rm -f config-all-devices.mak config-all-devices.h*
+       rm -f roms/seabios/config.mak roms/vgabios/config.mak
        rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
        for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
        rm -rf $$d || exit 1 ; \