From: heister Date: Mon, 5 Nov 2012 17:13:26 +0000 (+0000) Subject: add an indent target using astyle, work in progress (taken from aspect) X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ebf325584371ebd912040083df42a96c44d9502;p=dealii-svn.git add an indent target using astyle, work in progress (taken from aspect) git-svn-id: https://svn.dealii.org/trunk@27405 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/Makefile b/deal.II/Makefile index b42a02a4a6..077c1f8c8e 100644 --- a/deal.II/Makefile +++ b/deal.II/Makefile @@ -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 index 0000000000..ef69b85715 --- /dev/null +++ b/deal.II/common/astyle.rc @@ -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