Makefile.in
branchSDL-1.3
changeset 1670 eef792d31de8
parent 1664 cd3db072ba8a
child 1692 75f2ace8511a
     1.1 --- a/Makefile.in	Mon May 29 05:08:33 2006 +0000
     1.2 +++ b/Makefile.in	Wed Jun 07 16:10:28 2006 +0000
     1.3 @@ -125,14 +125,6 @@
     1.4  	    rm -f $(mandir)/man3/$$file; \
     1.5  	done
     1.6  
     1.7 -indent:
     1.8 -	cd $(srcdir) && \
     1.9 -	find . \( \
    1.10 -	    -name '*.h' -o \
    1.11 -	    -name '*.c' -o \
    1.12 -	    -name '*.cc' \) \
    1.13 -	    -exec indent {} \;
    1.14 -
    1.15  clean:
    1.16  	rm -rf $(objects)
    1.17  	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
    1.18 @@ -173,6 +165,29 @@
    1.19  rpm: $(distfile)
    1.20  	rpmbuild -ta $?
    1.21  
    1.22 +# Run indent on the source to standardize coding style
    1.23 +indent:
    1.24 +	@echo "Running indent... modified files:"
    1.25 +	@cd $(srcdir) && \
    1.26 +	find . \( \
    1.27 +	    -name '*.h' -o \
    1.28 +	    -name '*.c' -o \
    1.29 +	    -name '*.cc' \) \
    1.30 +	    -print | \
    1.31 +	while read file; do \
    1.32 +	    indent "$$file" -o "$$file.indent"; \
    1.33 +	    if cmp "$$file" "$$file.indent" >/dev/null; then \
    1.34 +	        rm -f "$$file.indent"; \
    1.35 +	    else \
    1.36 +	        echo "$$file"; \
    1.37 +	        mv -f "$$file.indent" "$$file"; \
    1.38 +	    fi; \
    1.39 +	done
    1.40 +
    1.41 +# Run indent and then commit modified files
    1.42 +commit: indent
    1.43 +	svn commit
    1.44 +
    1.45  # Create a SVN snapshot that people can run update on
    1.46  snapshot:
    1.47  	svn co svn://libsdl.org/trunk/SDL