Makefile.in
changeset 1895 c121d94672cb
parent 1894 c69cee13dd76
child 1896 4a74fa359e7e
--- a/Makefile.in	Thu Jul 06 18:01:37 2006 +0000
+++ b/Makefile.in	Mon Jul 10 21:04:37 2006 +0000
@@ -167,6 +167,29 @@
 rpm: $(distfile)
 	rpmbuild -ta $?
 
+# Run indent on the source to standardize coding style
+indent:
+	@echo "Running indent... modified files:"
+	@cd $(srcdir) && \
+	find . \( \
+	    -name '*.h' -o \
+	    -name '*.c' -o \
+	    -name '*.cc' \) \
+	    -print | \
+	while read file; do \
+	    indent "$$file" -o "$$file.indent"; \
+	    if cmp "$$file" "$$file.indent" >/dev/null; then \
+	        rm -f "$$file.indent"; \
+	    else \
+	        echo "$$file"; \
+	        mv -f "$$file.indent" "$$file"; \
+	    fi; \
+	done
+
+# Run indent and then commit modified files
+commit: indent
+	svn commit
+
 # Create a SVN snapshot that people can run update on
 snapshot:
 	svn co svn://libsdl.org/trunk/SDL