diff mbox

[6/7] Makefile: check whether xfsprogs-dev exists before cleaning it

Message ID 20170525192549.138518-7-ebiggers3@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Biggers May 25, 2017, 7:25 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

If running 'make clean' (or do-all) before the repositories have been
cloned, don't try to clean a nonexistent xfsprogs-dev directory.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 6be3752..ced32b2 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@  clean:
 	do \
 		if test -f $$i/Makefile ; then make -C $$i clean ; fi ; \
 	done
-	make -C xfsprogs-dev realclean
+	if test -d xfsprogs-dev; then make -C xfsprogs-dev realclean; fi
 	rm -rf bld xfstests
 	rm -f kvm-xfstests/util/zerofree $(SCRIPTS)