1 ## Process this file with automake to create Makefile.in.
2 AUTOMAKE_OPTIONS = 1.12
4 SUBDIRS = po lib src doc contrib misc
12 dist_noinst_SCRIPTS = \
16 dist_noinst_HEADERS = $(top_srcdir)/mc-version.h
18 ACLOCAL_AMFLAGS = -I m4
20 CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/mc-version.h
22 .PHONY: update-version \
25 cppcheck-information \
26 cppcheck-performance \
27 cppcheck-portability \
34 @if test -x $(top_srcdir)/version.sh; then \
35 $(top_srcdir)/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
37 if test ! -e $(top_srcdir)/mc-version.h; then \
38 echo "File not found: $(top_srcdir)/version.sh"; \
43 $(top_srcdir)/mc-version.h: update-version
45 CPPCHECK_CMD = cppcheck \
50 -I $(top_srcdir)/lib \
58 CPPCHECK_OUT_PREFIX = $(top_builddir)/cppcheck-
60 CPPCHECK_OUT_EXT = log.txt
62 CPPCHECK_SED_FILTER = \
63 -e '/is reassigned a value before the old one has been used./d' \
64 -e '/ Unmatched suppression: /d' \
65 -e "/Skipping configuration '.*' since the value of '.*' is unknown./d"
68 $(CPPCHECK_CMD) --enable=all $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT);
69 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT)
71 cppcheck-all: cppcheck
74 $(CPPCHECK_CMD) --enable=information $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT);
75 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT)
78 $(CPPCHECK_CMD) --enable=performance $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT);
79 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT)
82 $(CPPCHECK_CMD) --enable=portability $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT);
83 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT)
86 $(CPPCHECK_CMD) --enable=style $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT);
87 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT)
90 $(CPPCHECK_CMD) --enable=warning $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT);
91 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT)
93 cppcheck-unusedFunction:
94 $(CPPCHECK_CMD) --enable=unusedFunction $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT);
95 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT)
97 cppcheck-missingInclude:
98 $(CPPCHECK_CMD) --enable=missingInclude $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT);
99 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT)
101 cppcheck-split-all: \
102 cppcheck-information \
103 cppcheck-performance \
104 cppcheck-portability \
107 cppcheck-unusedFunction \
108 cppcheck-missingInclude
110 INDENT_CMD = indent \
112 --format-first-column-comments \
117 --blank-lines-after-procedures
120 "$(top_srcdir)/lib" \
121 "$(top_srcdir)/src" \
122 "$(top_srcdir)/tests"
125 for directory in $(INDENT_DIRS); do \
126 find "$${directory}" -name '*.[ch]' -print0 | \
127 xargs -0 $(INDENT_CMD); \