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 '/\/src\/vfs\/smbfs\//d' \
64 -e '/is reassigned a value before the old one has been used./d' \
65 -e '/ Unmatched suppression: /d' \
66 -e "/Skipping configuration '.*' since the value of '.*' is unknown./d"
69 $(CPPCHECK_CMD) --enable=all $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT);
70 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT)
72 cppcheck-all: cppcheck
75 $(CPPCHECK_CMD) --enable=information $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT);
76 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT)
79 $(CPPCHECK_CMD) --enable=performance $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT);
80 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT)
83 $(CPPCHECK_CMD) --enable=portability $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT);
84 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT)
87 $(CPPCHECK_CMD) --enable=style $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT);
88 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT)
91 $(CPPCHECK_CMD) --enable=warning $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT);
92 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT)
94 cppcheck-unusedFunction:
95 $(CPPCHECK_CMD) --enable=unusedFunction $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT);
96 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT)
98 cppcheck-missingInclude:
99 $(CPPCHECK_CMD) --enable=missingInclude $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT);
100 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT)
102 cppcheck-split-all: \
103 cppcheck-information \
104 cppcheck-performance \
105 cppcheck-portability \
108 cppcheck-unusedFunction \
109 cppcheck-missingInclude
111 INDENT_CMD = indent \
113 --format-first-column-comments \
118 --blank-lines-after-procedures
121 "$(top_srcdir)/lib" \
122 "$(top_srcdir)/src" \
123 "$(top_srcdir)/tests"
126 for directory in $(INDENT_DIRS); do \
127 find "$${directory}" -name '*.[ch]' -print0 | \
128 xargs -0 $(INDENT_CMD); \