Skip to content

Commit 41f9b60

Browse files
slavazaborodin
authored andcommitted
Add indent rule in makefile
Signed-off-by: Slava Zanko <[email protected]>
1 parent c6e094f commit 41f9b60

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

Makefile.am

+21-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ CPPCHECK_CMD = cppcheck \
5050
--std=c99
5151

5252
CPPCHECK_DIRS = \
53-
$(top_srcdir)/lib \
54-
$(top_srcdir)/src
53+
"$(top_srcdir)/lib" \
54+
"$(top_srcdir)/src"
5555

5656
CPPCHECK_OUT_PREFIX = $(top_builddir)/cppcheck-
5757

@@ -106,3 +106,22 @@ cppcheck-split-all: \
106106
cppcheck-unusedFunction \
107107
cppcheck-missingInclude
108108

109+
INDENT_CMD = indent \
110+
--gnu-style \
111+
--format-first-column-comments \
112+
--indent-level4 \
113+
--brace-indent0 \
114+
--line-length100 \
115+
--no-tabs \
116+
--blank-lines-after-procedures
117+
118+
INDENT_DIRS = \
119+
"$(top_srcdir)/lib" \
120+
"$(top_srcdir)/src" \
121+
"$(top_srcdir)/tests"
122+
123+
indent:
124+
for directory in $(INDENT_DIRS); do \
125+
find "$${directory}" -name '*.[ch]' -print0 | \
126+
xargs -0 $(INDENT_CMD); \
127+
done

0 commit comments

Comments
 (0)