gtk-doc-plugins.mak: fail on compiling scanner
[platform/upstream/gst-common.git] / cruft.mak
index ca59440..53eec24 100644 (file)
--- a/cruft.mak
+++ b/cruft.mak
@@ -5,7 +5,7 @@
 # set CRUFT_FILES and/or CRUFT_DIRS in your Makefile.am when you include this
 
 check-cruft:
-       cruft_files=""; cruft_dirs=""; \
+       @cruft_files=""; cruft_dirs=""; \
        for f in $(CRUFT_FILES); do \
          if test -e $$f; then \
            cruft_files="$$cruft_files $$f"; \
@@ -30,8 +30,25 @@ check-cruft:
          echo; \
          for d in $$cruft_dirs; do echo "directory $$d"; done; \
          echo; \
+         echo "'make clean-cruft' will remove these for you."; \
+         echo; \
        fi
 
+clean-cruft-dirs:
+       @for d in $(CRUFT_DIRS); do \
+         if test -e $$d; then \
+           rm -r "$$d" && echo "Removed directory $$d"; \
+         fi \
+       done
+
+clean-cruft-files:
+       @for f in $(CRUFT_FILES); do \
+         if test -e $$f; then \
+           rm "$$f" && echo "Removed file $$f"; \
+         fi \
+       done
+
+clean-cruft: clean-cruft-dirs clean-cruft-files
 
 # also might want to add this to your Makefile.am:
 #