From 2596aeac80be494ae318fac8ea984aeb599aec0e Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Sun, 20 Jan 2013 15:36:27 +0100 Subject: [PATCH] Add "make style" directive to format source code --- Makefile.am | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index b0326f8..1170343 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,10 @@ SUBDIRS = src -#pkgconfigdir = $(libdir)/pkgconfig -#pkgconfig_DATA = libnfc.pc +style: + find . -name "*.[ch]" -exec perl -pi -e 's/[ \t]+$$//' {} \; + find . -name "*.[ch]" -exec astyle --formatted --mode=c --suffix=none \ + --indent=spaces=2 --indent-switches --indent-preprocessor \ + --keep-one-line-blocks --max-instatement-indent=60 \ + --brackets=linux --pad-oper --unpad-paren --pad-header \ + --align-pointer=name {} \; +