Makefile.in
changeset 1895 c121d94672cb
parent 1894 c69cee13dd76
child 1896 4a74fa359e7e
     1.1 --- a/Makefile.in	Thu Jul 06 18:01:37 2006 +0000
     1.2 +++ b/Makefile.in	Mon Jul 10 21:04:37 2006 +0000
     1.3 @@ -167,6 +167,29 @@
     1.4  rpm: $(distfile)
     1.5  	rpmbuild -ta $?
     1.6  
     1.7 +# Run indent on the source to standardize coding style
     1.8 +indent:
     1.9 +	@echo "Running indent... modified files:"
    1.10 +	@cd $(srcdir) && \
    1.11 +	find . \( \
    1.12 +	    -name '*.h' -o \
    1.13 +	    -name '*.c' -o \
    1.14 +	    -name '*.cc' \) \
    1.15 +	    -print | \
    1.16 +	while read file; do \
    1.17 +	    indent "$$file" -o "$$file.indent"; \
    1.18 +	    if cmp "$$file" "$$file.indent" >/dev/null; then \
    1.19 +	        rm -f "$$file.indent"; \
    1.20 +	    else \
    1.21 +	        echo "$$file"; \
    1.22 +	        mv -f "$$file.indent" "$$file"; \
    1.23 +	    fi; \
    1.24 +	done
    1.25 +
    1.26 +# Run indent and then commit modified files
    1.27 +commit: indent
    1.28 +	svn commit
    1.29 +
    1.30  # Create a SVN snapshot that people can run update on
    1.31  snapshot:
    1.32  	svn co svn://libsdl.org/trunk/SDL