]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add an indent target using astyle, work in progress (taken from aspect)
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 5 Nov 2012 17:13:26 +0000 (17:13 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 5 Nov 2012 17:13:26 +0000 (17:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@27405 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/Makefile
deal.II/common/astyle.rc [new file with mode: 0644]

index b42a02a4a62172ca6fc7ed5bba3e0624c4ed80f3..077c1f8c8ed11d7f1b669861fd8274092e07ee93 100644 (file)
@@ -153,6 +153,16 @@ build-test-do:
        @echo BUILD TEST SUCCESSFUL `date -u '+%Y-%m-%d %T'`
 
 
+style-h-files:= $(wildcard include/deal.II/*/*.h)
+style-cc-files:= $(wildcard source/*/*.cc)
+
+indent:
+       @echo "============ Indenting all files"
+       astyle --options=common/astyle.rc $(style-h-files) $(style-cc-files)
+
+.PHONY: indent 
+
+
 .PHONY: all \
         online-doc doc printable-doc tex-doc contrib \
         clean clean-contrib clean-base clean-lac clean-dealII \
diff --git a/deal.II/common/astyle.rc b/deal.II/common/astyle.rc
new file mode 100644 (file)
index 0000000..ef69b85
--- /dev/null
@@ -0,0 +1,31 @@
+# astyle 2.02 indentation style for deal.II
+# Run astyle in a command like
+#    astyle --options=lib/astyle.rc *cc *h
+
+--style=gnu
+
+--convert-tabs
+--indent-preprocessor
+--indent=spaces=2
+--indent-namespaces
+--indent-labels
+#--no-indent-col1-comments
+--min-conditional-indent=0
+#--no-break-blocks
+--pad-header
+
+# indent the 'public/protected/private' specifiers, and further indent the
+# rest of the declarations
+--indent-classes
+
+# indent case labels in a switch statement
+--indent-switches
+
+# write things as 'char *p', not 'char* p'
+--align-pointer=name
+--align-reference=name
+
+--max-instatement-indent=80
+--suffix=none
+--quiet
+#--verbose

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.