]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Improve clean target
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Nov 2014 10:43:08 +0000 (11:43 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Nov 2014 10:43:25 +0000 (11:43 +0100)
Now it should work even under Windows.

Makefile

index af67834a6a43307553287e25c8f2626b66584b51..be01ef347ff9f411940775004258093660107871 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,13 @@ rpp-test-sw: $(TMP_WORKSPACE)
 # Previous commands do not always return non-zero exit code on build failure - invoke make directly to not miss a potential error
        $(MAKE) -C $(CURDIR)/rpp-test-sw/Debug all
 
+define RM_OLD_WORKSPACES
+$(foreach i,$(wildcard $(TMP_WORKSPACE) $(basename $(TMP_WORKSPACE)).*),$(call rmdir,$(i))
+)
+endef
+
 clean:
-       $(call rmdir,$(wildcard $(basename $(TMP_WORKSPACE)).*))
+       -$(RM_OLD_WORKSPACES)
 
 $(TMP_WORKSPACE):
        $(call mkdir,$(TMP_WORKSPACE))