From 14ed371845c50aa8fe5849c373ca2c65e96ec153 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 5 Aug 2011 13:16:47 +0100 Subject: Make "make -C test clean" idempotent Previously, it'd fail when done twice, because you can't rmdir a nonexistent directory. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40004 Reviewed-by: Will Thompson --- test/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Makefile.am b/test/Makefile.am index e5fd756b..74744559 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -272,6 +272,8 @@ clean-local: REVERSEDIRS="$$D $$REVERSEDIRS" ; \ done ; \ for D in $$REVERSEDIRS; do \ - rmdir $(top_builddir)/test/$$D || exit 1 ; \ + rmdir $(top_builddir)/test/$$D || \ + test ! -d $(top_builddir)/test/$$D || \ + exit 1 ; \ done ; \ fi -- cgit v1.2.3