1 ## Process this file with automake to create Makefile.in.
4 SUBDIRS = intl po lib src doc contrib misc
12 dist_noinst_SCRIPTS = build-glib2.sh
14 dist_noinst_HEADERS = $(top_srcdir)/version.h
16 ACLOCAL_AMFLAGS = -I m4
18 CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/version.h
20 .PHONY: update-version \
23 cppcheck-information \
24 cppcheck-performance \
25 cppcheck-portability \
32 @if test -x $(top_srcdir)/maint/utils/version.sh; then \
33 $(top_srcdir)/maint/utils/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
35 if test ! -e $(top_srcdir)/version.h; then \
36 echo "File not found: $(top_srcdir)/maint/utils/version.sh"; \
41 $(top_srcdir)/version.h: update-version
43 CPPCHECK_CMD = cppcheck \
48 -I $(top_srcdir)/lib \
56 CPPCHECK_OUT_PREFIX = $(top_builddir)/cppcheck-
58 CPPCHECK_OUT_EXT = log.txt
60 CPPCHECK_SED_FILTER = \
61 -e '/\/src\/vfs\/smbfs\//d' \
62 -e '/is reassigned a value before the old one has been used./d' \
63 -e '/ Unmatched suppression: /d' \
64 -e "/Skipping configuration '.*' since the value of '.*' is unknown./d"
67 $(CPPCHECK_CMD) --enable=all $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT);
68 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT)
70 cppcheck-all: cppcheck
73 $(CPPCHECK_CMD) --enable=information $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT);
74 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT)
77 $(CPPCHECK_CMD) --enable=performance $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT);
78 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT)
81 $(CPPCHECK_CMD) --enable=portability $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT);
82 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT)
85 $(CPPCHECK_CMD) --enable=style $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT);
86 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT)
89 $(CPPCHECK_CMD) --enable=warning $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT);
90 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT)
92 cppcheck-unusedFunction:
93 $(CPPCHECK_CMD) --enable=unusedFunction $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT);
94 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT)
96 cppcheck-missingInclude:
97 $(CPPCHECK_CMD) --enable=missingInclude $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT);
98 $(SED) -i $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT)
100 cppcheck-split-all: \
101 cppcheck-information \
102 cppcheck-performance \
103 cppcheck-portability \
106 cppcheck-unusedFunction \
107 cppcheck-missingInclude
109 INDENT_CMD = indent \
111 --format-first-column-comments \
116 --blank-lines-after-procedures
119 "$(top_srcdir)/lib" \
120 "$(top_srcdir)/src" \
121 "$(top_srcdir)/tests"
124 for directory in $(INDENT_DIRS); do \
125 find "$${directory}" -name '*.[ch]' -print0 | \
126 xargs -0 $(INDENT_CMD); \