]> granicus.if.org Git - php/commitdiff
Add actions for the gitclean target.
authorDavid Soria Parra <dsp@php.net>
Tue, 11 Aug 2009 02:21:09 +0000 (02:21 +0000)
committerDavid Soria Parra <dsp@php.net>
Tue, 11 Aug 2009 02:21:09 +0000 (02:21 +0000)
build/build.mk

index 8640ac139f56bff1413f3b2d43dbba3006fff458..9fd8e198b9fc97d3254aa2ae259a78c98ec7e1c5 100644 (file)
@@ -73,6 +73,9 @@ svnclean-work:
        done
 
 gitclean-work:
-       @echo "We don't know how to clean Git checkouts yet."
+       @if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \
+               (echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \
+       fi; \
+       git clean -X -f -d;
 
 .PHONY: $(ALWAYS) snapshot