diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -99,7 +99,7 @@ ifdef VERBOSE endif -.PHONY: help clean_except_last clean_bases clean_all +.PHONY: help clean_except_last clean_bases clean_all clean_failed help: @@ -170,6 +170,18 @@ clean_except_last: | xargs -r -0 -n1 rm -rf; ) +clean_failed: + @-$(foreach template,$(TEMPLATES),\ + test -d $(template) && \ + find $(template)/* \ + -maxdepth 0 \ + -type d \ + -not -name base \ + -print0 \ + | xargs -r -0 -n1 -i \ + $(SHELL) -c 'test -d "{}/build" || rm -rf "{}"') + + clean_bases: @-$(foreach template,$(TEMPLATES),\ test -d $(template) && rm -rf $(template)/base;) |