2000-08-24 18:13:00 +04:00
|
|
|
## Process this file with automake to create Makefile.in.
|
2020-12-30 18:23:26 +03:00
|
|
|
AUTOMAKE_OPTIONS = 1.12
|
2001-09-07 08:25:02 +04:00
|
|
|
|
2019-09-12 00:58:18 +03:00
|
|
|
SUBDIRS = po lib src doc contrib misc
|
2000-08-24 18:13:00 +04:00
|
|
|
|
2011-07-11 12:22:46 +04:00
|
|
|
if HAVE_TESTS
|
|
|
|
SUBDIRS += tests
|
|
|
|
endif
|
|
|
|
|
2009-01-10 18:26:14 +03:00
|
|
|
EXTRA_DIST =
|
2000-08-24 18:13:00 +04:00
|
|
|
|
2021-05-26 21:47:57 +03:00
|
|
|
dist_noinst_SCRIPTS = \
|
|
|
|
build-glib2.sh \
|
|
|
|
version.sh
|
2000-09-23 21:24:08 +04:00
|
|
|
|
2021-03-18 15:25:06 +03:00
|
|
|
dist_noinst_HEADERS = $(top_srcdir)/mc-version.h
|
2009-06-02 17:36:58 +04:00
|
|
|
|
2002-09-17 20:13:25 +04:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2021-03-18 15:25:06 +03:00
|
|
|
CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/mc-version.h
|
2009-06-02 17:36:58 +04:00
|
|
|
|
2013-10-09 15:38:09 +04:00
|
|
|
.PHONY: update-version \
|
|
|
|
cppcheck \
|
|
|
|
cppcheck-error \
|
|
|
|
cppcheck-information \
|
|
|
|
cppcheck-performance \
|
|
|
|
cppcheck-portability \
|
|
|
|
cppcheck-style \
|
|
|
|
cppcheck-warning \
|
|
|
|
cppcheck-all
|
|
|
|
|
2009-06-02 17:36:58 +04:00
|
|
|
|
|
|
|
update-version:
|
2021-05-26 21:47:57 +03:00
|
|
|
@if test -x $(top_srcdir)/version.sh; then \
|
|
|
|
$(top_srcdir)/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \
|
2009-06-02 17:36:58 +04:00
|
|
|
else \
|
2021-03-18 15:25:06 +03:00
|
|
|
if test ! -e $(top_srcdir)/mc-version.h; then \
|
2021-05-26 21:47:57 +03:00
|
|
|
echo "File not found: $(top_srcdir)/version.sh"; \
|
2011-07-26 16:55:02 +04:00
|
|
|
exit 1; \
|
|
|
|
fi; \
|
2009-06-02 17:36:58 +04:00
|
|
|
fi
|
|
|
|
|
2021-03-18 15:25:06 +03:00
|
|
|
$(top_srcdir)/mc-version.h: update-version
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
CPPCHECK_CMD = cppcheck \
|
|
|
|
--inline-suppr \
|
|
|
|
--error-exitcode=0 \
|
|
|
|
-j 4 \
|
|
|
|
--force \
|
|
|
|
-I $(top_srcdir)/lib \
|
|
|
|
--language=c \
|
|
|
|
--std=c99
|
|
|
|
|
|
|
|
CPPCHECK_DIRS = \
|
2013-10-09 16:14:21 +04:00
|
|
|
"$(top_srcdir)/lib" \
|
|
|
|
"$(top_srcdir)/src"
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
CPPCHECK_OUT_PREFIX = $(top_builddir)/cppcheck-
|
|
|
|
|
|
|
|
CPPCHECK_OUT_EXT = log.txt
|
|
|
|
|
|
|
|
CPPCHECK_SED_FILTER = \
|
|
|
|
-e '/is reassigned a value before the old one has been used./d' \
|
|
|
|
-e '/ Unmatched suppression: /d' \
|
|
|
|
-e "/Skipping configuration '.*' since the value of '.*' is unknown./d"
|
|
|
|
|
|
|
|
cppcheck:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=all $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-all: cppcheck
|
|
|
|
|
|
|
|
cppcheck-information:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=information $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)information.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)all.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-performance:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=performance $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)performance.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-portability:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=portability $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)portability.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-style:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=style $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)style.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-warning:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=warning $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)warning.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-unusedFunction:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=unusedFunction $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)unusedFunction.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-missingInclude:
|
2023-05-19 18:29:56 +03:00
|
|
|
$(CPPCHECK_CMD) --enable=missingInclude $(CPPCHECK_DIRS) 2>$(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT).tmp;
|
|
|
|
$(SED) $(CPPCHECK_SED_FILTER) $(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT).tmp > $(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT)
|
|
|
|
rm -f $(CPPCHECK_OUT_PREFIX)missingInclude.$(CPPCHECK_OUT_EXT).tmp
|
2013-10-09 15:38:09 +04:00
|
|
|
|
|
|
|
cppcheck-split-all: \
|
|
|
|
cppcheck-information \
|
|
|
|
cppcheck-performance \
|
|
|
|
cppcheck-portability \
|
|
|
|
cppcheck-style \
|
|
|
|
cppcheck-warning \
|
|
|
|
cppcheck-unusedFunction \
|
|
|
|
cppcheck-missingInclude
|
|
|
|
|
2013-10-09 16:14:21 +04:00
|
|
|
INDENT_CMD = indent \
|
|
|
|
--gnu-style \
|
|
|
|
--format-first-column-comments \
|
|
|
|
--indent-level4 \
|
|
|
|
--brace-indent0 \
|
|
|
|
--line-length100 \
|
|
|
|
--no-tabs \
|
|
|
|
--blank-lines-after-procedures
|
|
|
|
|
|
|
|
INDENT_DIRS = \
|
|
|
|
"$(top_srcdir)/lib" \
|
|
|
|
"$(top_srcdir)/src" \
|
|
|
|
"$(top_srcdir)/tests"
|
|
|
|
|
|
|
|
indent:
|
|
|
|
for directory in $(INDENT_DIRS); do \
|
|
|
|
find "$${directory}" -name '*.[ch]' -print0 | \
|
|
|
|
xargs -0 $(INDENT_CMD); \
|
|
|
|
done
|