]> 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 c8132d5760fb43005d533c516f1a20bcc756ad1c..5aebae1a1af1d9f9ca2b45ec323db3b5d14a603e 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