aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am361
1 files changed, 298 insertions, 63 deletions
diff --git a/Makefile.am b/Makefile.am
index c7bc514287..a212ae19c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,12 @@ AM_CPPFLAGS=\
-I$(top_srcdir)/src/ext/trunnel \
-I$(top_srcdir)/src/trunnel
-AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
+AM_CFLAGS= \
+ @TOR_SYSTEMD_CFLAGS@ \
+ @CFLAGS_BUGTRAP@ \
+ @TOR_LZMA_CFLAGS@ \
+ @TOR_ZSTD_CFLAGS@
+
SHELL=@SHELL@
if COVERAGE_ENABLED
@@ -31,9 +36,7 @@ TESTING_TOR_BINARY=$(top_builddir)/src/app/tor$(EXEEXT)
endif
if USE_RUST
-## this MUST be $(), otherwise am__DEPENDENCIES will not track it
-rust_ldadd=$(top_builddir)/$(TOR_RUST_LIB_PATH) \
- $(TOR_RUST_EXTRA_LIBS)
+rust_ldadd=$(top_builddir)/$(TOR_RUST_LIB_PATH)
else
rust_ldadd=
endif
@@ -42,6 +45,10 @@ endif
TOR_UTIL_LIBS = \
src/lib/libtor-geoip.a \
src/lib/libtor-process.a \
+ src/lib/libtor-buf.a \
+ src/lib/libtor-confmgt.a \
+ src/lib/libtor-pubsub.a \
+ src/lib/libtor-dispatch.a \
src/lib/libtor-time.a \
src/lib/libtor-fs.a \
src/lib/libtor-encoding.a \
@@ -62,6 +69,8 @@ TOR_UTIL_LIBS = \
src/lib/libtor-malloc.a \
src/lib/libtor-wallclock.a \
src/lib/libtor-err.a \
+ src/lib/libtor-version.a \
+ src/lib/libtor-llharden.a \
src/lib/libtor-intmath.a \
src/lib/libtor-ctime.a
@@ -71,6 +80,10 @@ if UNITTESTS_ENABLED
TOR_UTIL_TESTING_LIBS = \
src/lib/libtor-geoip-testing.a \
src/lib/libtor-process-testing.a \
+ src/lib/libtor-buf-testing.a \
+ src/lib/libtor-confmgt-testing.a \
+ src/lib/libtor-pubsub-testing.a \
+ src/lib/libtor-dispatch-testing.a \
src/lib/libtor-time-testing.a \
src/lib/libtor-fs-testing.a \
src/lib/libtor-encoding-testing.a \
@@ -91,6 +104,8 @@ TOR_UTIL_TESTING_LIBS = \
src/lib/libtor-malloc-testing.a \
src/lib/libtor-wallclock-testing.a \
src/lib/libtor-err-testing.a \
+ src/lib/libtor-version-testing.a \
+ src/lib/libtor-llharden-testing.a \
src/lib/libtor-intmath.a \
src/lib/libtor-ctime-testing.a
endif
@@ -152,16 +167,52 @@ include contrib/include.am
manpages: $(nodist_man1_MANS)
EXTRA_DIST+= \
- ChangeLog \
- CONTRIBUTING \
- CODE_OF_CONDUCT \
- INSTALL \
- LICENSE \
- Makefile.nmake \
- README \
- ReleaseNotes \
- scripts/maint/checkIncludes.py \
- scripts/maint/checkSpace.pl
+ ChangeLog \
+ CONTRIBUTING \
+ CODE_OF_CONDUCT \
+ INSTALL \
+ LICENSE \
+ Makefile.nmake \
+ README \
+ ReleaseNotes \
+ scripts/maint/checkIncludes.py \
+ scripts/maint/checkSpace.pl \
+ scripts/maint/checkSpaceTest.sh \
+ scripts/maint/checkspace_tests/dubious.c \
+ scripts/maint/checkspace_tests/dubious.h \
+ scripts/maint/checkspace_tests/expected.txt \
+ scripts/maint/checkspace_tests/good_guard.h \
+ scripts/maint/checkspace_tests/same_guard.h \
+ scripts/maint/checkspace_tests/subdir/dubious.c \
+ scripts/maint/checkShellScripts.sh \
+ scripts/maint/practracker/README \
+ scripts/maint/practracker/exceptions.txt \
+ scripts/maint/practracker/includes.py \
+ scripts/maint/practracker/metrics.py \
+ scripts/maint/practracker/practracker.py \
+ scripts/maint/practracker/practracker_tests.py \
+ scripts/maint/practracker/problem.py \
+ scripts/maint/practracker/testdata/.may_include \
+ scripts/maint/practracker/testdata/a.c \
+ scripts/maint/practracker/testdata/b.c \
+ scripts/maint/practracker/testdata/ex0-expected.txt \
+ scripts/maint/practracker/testdata/ex0.txt \
+ scripts/maint/practracker/testdata/ex1-expected.txt \
+ scripts/maint/practracker/testdata/ex1.txt \
+ scripts/maint/practracker/testdata/ex1-overbroad-expected.txt \
+ scripts/maint/practracker/testdata/ex1-regen-expected.txt \
+ scripts/maint/practracker/testdata/ex1-regen-overbroad-expected.txt \
+ scripts/maint/practracker/testdata/ex.txt \
+ scripts/maint/practracker/testdata/header.h \
+ scripts/maint/practracker/testdata/not_c_file \
+ scripts/maint/practracker/test_practracker.sh \
+ scripts/maint/practracker/util.py \
+ scripts/coccinelle/apply.sh \
+ scripts/coccinelle/check_cocci_parse.sh \
+ scripts/coccinelle/exceptions.txt \
+ scripts/coccinelle/test-operator-cleanup \
+ scripts/coccinelle/tor-coccinelle.h \
+ scripts/coccinelle/try_parse.sh
## This tells etags how to find mockable function definitions.
AM_ETAGSFLAGS=--regex='{c}/MOCK_IMPL([^,]+,\W*\([a-zA-Z0-9_]+\)\W*,/\1/s'
@@ -179,7 +230,7 @@ TEST_CFLAGS=
TEST_CPPFLAGS=-DTOR_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@
TEST_NETWORK_FLAGS=--hs-multi-client 1
endif
-TEST_NETWORK_WARNING_FLAGS=--quiet --only-warnings
+TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS=--quiet --only-warnings
if LIBFUZZER_ENABLED
TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div
@@ -209,65 +260,203 @@ dist-rpm: dist-gzip
echo "RPM build finished"; \
#end of dist-rpm
-doxygen:
- doxygen && cd doc/doxygen/latex && make
+.PHONY: doxygen
+doxygen: Doxyfile
+ mkdir -p doc/doxygen
+ (cd "$(top_srcdir)" && doxygen "$(abs_top_builddir)/Doxyfile")
test: all
$(top_builddir)/src/test/test
-check-local: check-spaces check-changes check-includes
+shellcheck:
+ $(top_srcdir)/scripts/maint/checkShellScripts.sh
+
+check-local: \
+ check-spaces \
+ check-changes \
+ check-includes \
+ shellcheck
+# test-network requires a copy of Chutney in $CHUTNEY_PATH.
+# Chutney can be cloned from https://git.torproject.org/chutney.git .
+.PHONY: need-chutney-path
need-chutney-path:
@if test ! -d "$$CHUTNEY_PATH"; then \
echo '$$CHUTNEY_PATH was not set.'; \
- if test -d $(top_srcdir)/../chutney -a -x $(top_srcdir)/../chutney/chutney; then \
- echo "Assuming test-network.sh will find" $(top_srcdir)/../chutney; \
+ if test -d "$(top_srcdir)/../chutney" && \
+ test -x "$(top_srcdir)/../chutney/chutney"; then \
+ echo "Assuming test-network.sh will find" \
+ "$(top_srcdir)/../chutney"; \
else \
echo; \
- echo "To run these tests, git clone https://git.torproject.org/chutney.git ; export CHUTNEY_PATH=\`pwd\`/chutney"; \
+ echo "To run these tests," \
+ "git clone" \
+ "https://git.torproject.org/chutney.git ;" \
+ "export CHUTNEY_PATH=\`pwd\`/chutney"; \
exit 1; \
fi \
fi
-# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
-# Chutney can be cloned from https://git.torproject.org/chutney.git .
-test-network: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
- $(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)
+# Run some basic tests using automake's test-driver
+.PHONY: test-network
+# Hide directory path logs from submakes using $(MAKE) -s
+test-network:
+ @$(MAKE) -s test-network-mkdir
+ @$(MAKE) -s test-network-clean
+ @$(MAKE) -s test-network-run \
+ ipv4_flavors="$(TEST_CHUTNEY_FLAVOR_QUICK)" \
+ ipv6_flavors="$(TEST_CHUTNEY_FLAVOR_QUICK_IPV6)"
+ @$(MAKE) -s test-network-results
# Run all available tests using automake's test-driver
-# only run IPv6 tests if we can ping6 ::1 (localhost)
-# only run IPv6 tests if we can ping ::1 (localhost)
-# some IPv6 tests will fail without an IPv6 DNS server (see #16971 and #17011)
-# only run mixed tests if we have a tor-stable binary
-# Try the syntax for BSD ping6, Linux ping6, and Linux ping -6,
-# because they're incompatible
-test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
- mkdir -p $(TEST_NETWORK_ALL_LOG_DIR)
- rm -f $(TEST_NETWORK_ALL_LOG_DIR)/*.log $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
- @flavors="$(TEST_CHUTNEY_FLAVORS)"; \
- if ping6 -q -c 1 -o ::1 >/dev/null 2>&1 || ping6 -q -c 1 -W 1 ::1 >/dev/null 2>&1 || ping -6 -c 1 -W 1 ::1 >/dev/null 2>&1; then \
- echo "ping6 ::1 or ping ::1 succeeded, running IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
- flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
- else \
- echo "ping6 ::1 and ping ::1 failed, skipping IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
- skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
+.PHONY: test-network-all
+# Hide directory path logs from submakes using $(MAKE) -s
+test-network-all:
+ @$(MAKE) -s test-network-mkdir
+ @$(MAKE) -s test-network-clean
+ @$(MAKE) -s test-network-run \
+ ipv4_flavors="$(TEST_CHUTNEY_FLAVORS)" \
+ mixed_flavors="$(TEST_CHUTNEY_FLAVORS_MIXED)" \
+ ipv6_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6)" \
+ ipv6_mixed_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6_MIXED)"
+ @$(MAKE) -s test-network-results
+
+# Run IPv4 and mixed tests using automake's test-driver
+.PHONY: test-network-ipv4
+# Hide directory path logs from submakes using $(MAKE) -s
+test-network-ipv4:
+ @$(MAKE) -s test-network-mkdir
+ @$(MAKE) -s test-network-clean
+ @$(MAKE) -s test-network-run \
+ ipv4_flavors="$(TEST_CHUTNEY_FLAVORS)" \
+ mixed_flavors="$(TEST_CHUTNEY_FLAVORS_MIXED)"
+ @$(MAKE) -s test-network-results
+
+# Run IPv6 tests using automake's test-driver
+.PHONY: test-network-ipv6
+# Hide directory path logs from submakes using $(MAKE) -s
+test-network-ipv6:
+ @$(MAKE) -s test-network-mkdir
+ @$(MAKE) -s test-network-clean
+ @$(MAKE) -s test-network-run \
+ ipv6_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6)" \
+ ipv6_mixed_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6_MIXED)"
+ @$(MAKE) -s test-network-results
+
+# Make the test network log directory, if it does not exist
+.PHONY: test-network-mkdir
+test-network-mkdir:
+ @mkdir -p "$(TEST_NETWORK_ALL_LOG_DIR)"
+
+# Clean the test network log directory
+.PHONY: test-network-clean
+# We need to remove all matching files, so we can't quote the glob part of the
+# rm arguments
+test-network-clean:
+ rm -f "$(TEST_NETWORK_ALL_LOG_DIR)"/*.log \
+ "$(TEST_NETWORK_ALL_LOG_DIR)"/*.trs
+
+# Run tests using automake's test-driver
+# When checking if a set of test can be run, log the type of test, and the
+# list of tests that will be run (or skipped).
+#
+# Run the IPv4 tests in $(ipv4_flavors), unconditionally
+# - tor relays and directory authorities require IPv4.
+# Run the IPv6 tests in $(ipv6_flavors), if IPv6 is available
+# - only run IPv6 tests if we can ping6 or ping -6 ::1 (localhost)
+# we try the syntax for BSD ping6, Linux ping6, and Linux ping -6,
+# because they're incompatible
+# - some IPv6 tests may fail without an IPv6 DNS server
+# (see #16971 and #17011)
+# Run the mixed tests in $(mixed_flavors), if a tor-stable binary is available
+# - only run mixed tests if we have a tor-stable binary
+# Run the IPv6 mixed tests in $(ipv6_mixed_flavors), if IPv6 and mixed are run
+# - see above for details about IPv6 and mixed
+.PHONY: test-network-run
+# We need the word splitting in the "for" lines, so we can't quote
+# $(skip_flavors) or $(flavors)
+test-network-run: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
+ @flavors=""; \
+ skip_flavors=""; \
+ if test -n "$(ipv4_flavors)"; then \
+ echo "Running IPv4 flavors: $(ipv4_flavors)."; \
+ flavors="$$flavors $(ipv4_flavors)"; \
fi; \
- if command -v tor-stable >/dev/null 2>&1; then \
- echo "tor-stable found, running mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
- flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
- else \
- echo "tor-stable not found, skipping mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
- skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
+ test_network_ipv6=false; \
+ if test -n "$(ipv6_flavors)" || \
+ test -n "$(ipv6_mixed_flavors)"; then \
+ if ping6 -q -c 1 -o ::1 >/dev/null 2>&1 || \
+ ping6 -q -c 1 -W 1 ::1 >/dev/null 2>&1 || \
+ ping -6 -c 1 -W 1 ::1 >/dev/null 2>&1; then \
+ test_network_ipv6=true; \
+ fi; \
+ fi; \
+ if test -n "$(ipv6_flavors)"; then \
+ if test "$$test_network_ipv6" = "true"; then \
+ echo "ping6 ::1 or ping ::1 succeeded, running IPv6" \
+ "flavors: $(ipv6_flavors)."; \
+ flavors="$$flavors $(ipv6_flavors)"; \
+ else \
+ echo "ping6 ::1 and ping ::1 failed, skipping IPv6" \
+ "flavors: $(ipv6_flavors)."; \
+ skip_flavors="$$skip_flavors $(ipv6_flavors)"; \
+ fi; \
+ fi; \
+ test_network_mixed=false; \
+ if test -n "$(mixed_flavors)" || \
+ test -n "$(ipv6_mixed_flavors)"; then \
+ if command -v tor-stable >/dev/null 2>&1; then \
+ test_network_mixed=true; \
+ fi; \
+ fi; \
+ if test -n "$(mixed_flavors)"; then \
+ if test "$$test_network_mixed" = "true"; then \
+ echo "tor-stable found, running mixed flavors:" \
+ "$(mixed_flavors)."; \
+ flavors="$$flavors $(mixed_flavors)"; \
+ else \
+ echo "tor-stable not found, skipping mixed flavors:" \
+ "$(mixed_flavors)."; \
+ skip_flavors="$$skip_flavors $(mixed_flavors)"; \
+ fi; \
+ fi; \
+ if test -n "$(ipv6_mixed_flavors)"; then \
+ if test "$$test_network_ipv6" = "true" && \
+ test "$$test_network_mixed" = "true"; then \
+ echo "Running IPv6 mixed flavors:" \
+ "$(ipv6_mixed_flavors)."; \
+ flavors="$$flavors $(ipv6_mixed_flavors)"; \
+ else \
+ echo "Skipping IPv6 mixed flavors:" \
+ "$(ipv6_mixed_flavors)."; \
+ skip_flavors="$$skip_flavors $(ipv6_mixed_flavors)"; \
+ fi; \
fi; \
for f in $$skip_flavors; do \
echo "SKIP: $$f"; \
done; \
for f in $$flavors; do \
- $(SHELL) $(top_srcdir)/test-driver --test-name $$f --log-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.log --trs-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs $(TEST_NETWORK_ALL_DRIVER_FLAGS) $(top_srcdir)/src/test/test-network.sh --flavor $$f $(TEST_NETWORK_FLAGS); \
- $(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_WARNING_FLAGS); \
- done; \
- echo "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."; \
- ! grep -q FAIL $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
+ $(SHELL) "$(top_srcdir)/test-driver" --test-name "$$f" \
+ --log-file "$(TEST_NETWORK_ALL_LOG_DIR)/$$f.log" \
+ --trs-file "$(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs" \
+ $(TEST_NETWORK_ALL_DRIVER_FLAGS) \
+ "$(top_srcdir)/src/test/test-network.sh" \
+ --flavor "$$f" $(TEST_NETWORK_FLAGS); \
+ "$(top_srcdir)/src/test/test-network.sh" \
+ $(TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS); \
+ done
+
+# Print the results from automake's test-driver
+# - show tor warnings on the console after each network run
+# (otherwise, warnings go to the logs, and people don't see them unless
+# there is a network failure)
+.PHONY: test-network-results
+# We need to grep all matching files, so we can't quote the glob part of the
+# grep arguments
+test-network-results:
+ @echo \
+ "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."
+ @! grep -q FAIL "$(TEST_NETWORK_ALL_LOG_DIR)"/*.trs
need-stem-path:
@if test ! -d "$$STEM_SOURCE_DIR"; then \
@@ -282,9 +471,19 @@ test-stem: need-stem-path $(TESTING_TOR_BINARY)
test-stem-full: need-stem-path $(TESTING_TOR_BINARY)
@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --all --log notice --target RUN_ALL,ONLINE -v;
-test-full: need-stem-path need-chutney-path check test-network test-stem
+test-full: \
+ need-stem-path \
+ need-chutney-path \
+ check \
+ test-network \
+ test-stem
-test-full-online: need-stem-path need-chutney-path check test-network test-stem-full
+test-full-online: \
+ need-stem-path \
+ need-chutney-path \
+ check \
+ test-network \
+ test-stem-full
# We can't delete the gcno files, because they are created when tor is compiled
reset-gcov:
@@ -319,11 +518,12 @@ coverage-html-full: all
lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
-# Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
-# tinytest*.[ch]
-check-spaces:
-if USE_PERL
- $(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \
+# For scripts: avoid src/ext and src/trunnel.
+# Keep these lists consistent:
+# - OWNED_TOR_C_FILES in Makefile.am
+# - CHECK_FILES in pre-commit.git-hook and pre-push.git-hook
+# - try_parse in check_cocci_parse.sh
+OWNED_TOR_C_FILES=\
$(top_srcdir)/src/lib/*/*.[ch] \
$(top_srcdir)/src/core/*/*.[ch] \
$(top_srcdir)/src/feature/*/*.[ch] \
@@ -331,13 +531,29 @@ if USE_PERL
$(top_srcdir)/src/test/*.[ch] \
$(top_srcdir)/src/test/*/*.[ch] \
$(top_srcdir)/src/tools/*.[ch]
+
+check-spaces:
+if USE_PERL
+ $(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \
+ $(OWNED_TOR_C_FILES)
endif
check-includes:
if USEPYTHON
- $(PYTHON) $(top_srcdir)/scripts/maint/checkIncludes.py
+ $(PYTHON) $(top_srcdir)/scripts/maint/practracker/includes.py $(top_srcdir)
+endif
+
+check-best-practices:
+if USEPYTHON
+ @$(PYTHON) $(top_srcdir)/scripts/maint/practracker/practracker.py $(top_srcdir) $(TOR_PRACTRACKER_OPTIONS)
endif
+check-cocci:
+ VERBOSE=1 $(top_srcdir)/scripts/coccinelle/check_cocci_parse.sh $(OWNED_TOR_C_FILES)
+
+practracker-regen:
+ $(PYTHON) $(top_srcdir)/scripts/maint/practracker/practracker.py --regen $(top_srcdir)
+
check-docs: all
$(PERL) $(top_builddir)/scripts/maint/checkOptionDocs.pl
@@ -414,17 +630,17 @@ endif
check-changes:
if USEPYTHON
@if test -d "$(top_srcdir)/changes"; then \
- $(PYTHON) $(top_srcdir)/scripts/maint/lintChanges.py $(top_srcdir)/changes; \
+ PACKAGE_VERSION=$(PACKAGE_VERSION) $(PYTHON) $(top_srcdir)/scripts/maint/lintChanges.py $(top_srcdir)/changes; \
fi
endif
.PHONY: update-versions
update-versions:
- $(PERL) $(top_builddir)/scripts/maint/updateVersions.pl
+ abs_top_srcdir="$(abs_top_srcdir)" $(PYTHON) $(top_srcdir)/scripts/maint/update_versions.py
.PHONY: callgraph
callgraph:
- $(top_builddir)/scripts/maint/run_calltool.sh
+ cd $(top_builddir); $(abs_top_srcdir)/scripts/maint/run_calltool.sh
version:
@echo "Tor @VERSION@"
@@ -433,6 +649,25 @@ version:
(cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
fi
+.PHONY: autostyle-ifdefs
+autostyle-ifdefs:
+ $(PYTHON) $(top_srcdir)/scripts/maint/annotate_ifdef_directives.py $(OWNED_TOR_C_FILES)
+
+.PHONY: autostyle-ifdefs
+autostyle-operators:
+ $(PERL) $(top_srcdir)/scripts/coccinelle/test-operator-cleanup $(OWNED_TOR_C_FILES)
+
+.PHONY: rectify-includes
+rectify-includes:
+ cd $(top_srcdir); $(PYTHON) $(abs_top_srcdir)/scripts/maint/rectify_include_paths.py
+
+.PHONY: update-copyright
+update-copyright:
+ $(PERL) $(top_srcdir)/scripts/maint/updateCopyright.pl $(OWNED_TOR_C_FILES)
+
+.PHONY: autostyle
+autostyle: update-versions rustfmt autostyle-ifdefs rectify-includes
+
mostlyclean-local:
rm -f $(top_builddir)/src/*/*.gc{da,no} $(top_builddir)/src/*/*/*.gc{da,no}
rm -rf $(HTML_COVER_DIR)