Merge branch 'maint-0.4.1' into release-0.4.1
[tor.git] / Makefile.am
blob10bd4b45c29f149271b4dafcc2dbc8ebf9c69041
1 # Copyright (c) 2001-2004, Roger Dingledine
2 # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
3 # Copyright (c) 2007-2019, The Tor Project, Inc.
4 # See LICENSE for licensing information
6 ACLOCAL_AMFLAGS = -I m4
8 noinst_LIBRARIES=
9 EXTRA_DIST=
10 noinst_HEADERS=
11 bin_PROGRAMS=
12 EXTRA_PROGRAMS=
13 CLEANFILES=
14 TESTS=
15 noinst_PROGRAMS=
16 DISTCLEANFILES=
17 bin_SCRIPTS=
18 AM_CPPFLAGS=\
19         -I$(top_srcdir)/src \
20         -I$(top_srcdir)/src/ext \
21         -I$(top_srcdir)/src/ext/trunnel \
22         -I$(top_srcdir)/src/trunnel
24 AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
25 SHELL=@SHELL@
27 if COVERAGE_ENABLED
28 TESTING_TOR_BINARY=$(top_builddir)/src/app/tor-cov$(EXEEXT)
29 else
30 TESTING_TOR_BINARY=$(top_builddir)/src/app/tor$(EXEEXT)
31 endif
33 if USE_RUST
34 rust_ldadd=$(top_builddir)/$(TOR_RUST_LIB_PATH)
35 else
36 rust_ldadd=
37 endif
39 # "Common" libraries used to link tor's utility code.
40 TOR_UTIL_LIBS = \
41         src/lib/libtor-geoip.a \
42         src/lib/libtor-process.a \
43         src/lib/libtor-buf.a \
44         src/lib/libtor-pubsub.a \
45         src/lib/libtor-dispatch.a \
46         src/lib/libtor-time.a \
47         src/lib/libtor-fs.a \
48         src/lib/libtor-encoding.a \
49         src/lib/libtor-sandbox.a \
50         src/lib/libtor-container.a \
51         src/lib/libtor-net.a \
52         src/lib/libtor-thread.a \
53         src/lib/libtor-memarea.a \
54         src/lib/libtor-math.a \
55         src/lib/libtor-meminfo.a \
56         src/lib/libtor-osinfo.a \
57         src/lib/libtor-log.a \
58         src/lib/libtor-lock.a \
59         src/lib/libtor-fdio.a \
60         src/lib/libtor-string.a \
61         src/lib/libtor-term.a \
62         src/lib/libtor-smartlist-core.a \
63         src/lib/libtor-malloc.a \
64         src/lib/libtor-wallclock.a \
65         src/lib/libtor-err.a \
66         src/lib/libtor-version.a \
67         src/lib/libtor-intmath.a \
68         src/lib/libtor-ctime.a
70 # Variants of the above for linking the testing variant of tor (for coverage
71 # and tests)
72 if UNITTESTS_ENABLED
73 TOR_UTIL_TESTING_LIBS = \
74         src/lib/libtor-geoip-testing.a \
75         src/lib/libtor-process-testing.a \
76         src/lib/libtor-buf-testing.a \
77         src/lib/libtor-pubsub-testing.a \
78         src/lib/libtor-dispatch-testing.a \
79         src/lib/libtor-time-testing.a \
80         src/lib/libtor-fs-testing.a \
81         src/lib/libtor-encoding-testing.a \
82         src/lib/libtor-sandbox-testing.a \
83         src/lib/libtor-container-testing.a \
84         src/lib/libtor-net-testing.a \
85         src/lib/libtor-thread-testing.a \
86         src/lib/libtor-memarea-testing.a \
87         src/lib/libtor-math-testing.a \
88         src/lib/libtor-meminfo-testing.a \
89         src/lib/libtor-osinfo-testing.a \
90         src/lib/libtor-term-testing.a \
91         src/lib/libtor-log-testing.a \
92         src/lib/libtor-lock-testing.a \
93         src/lib/libtor-fdio-testing.a \
94         src/lib/libtor-string-testing.a \
95         src/lib/libtor-smartlist-core-testing.a \
96         src/lib/libtor-malloc-testing.a \
97         src/lib/libtor-wallclock-testing.a \
98         src/lib/libtor-err-testing.a \
99         src/lib/libtor-version-testing.a \
100         src/lib/libtor-intmath.a \
101         src/lib/libtor-ctime-testing.a
102 endif
104 # Internal crypto libraries used in Tor
105 TOR_CRYPTO_LIBS = \
106         src/lib/libtor-tls.a \
107         src/lib/libtor-crypt-ops.a \
108         $(LIBKECCAK_TINY) \
109         $(LIBDONNA)
111 # Variants of the above for linking the testing variant of tor (for coverage
112 # and tests)
113 if UNITTESTS_ENABLED
114 TOR_CRYPTO_TESTING_LIBS = \
115         src/lib/libtor-tls-testing.a \
116         src/lib/libtor-crypt-ops-testing.a \
117         $(LIBKECCAK_TINY) \
118         $(LIBDONNA)
119 endif
121 # All static libraries used to link tor.
122 TOR_INTERNAL_LIBS = \
123         src/core/libtor-app.a \
124         src/lib/libtor-compress.a \
125         src/lib/libtor-evloop.a \
126         $(TOR_CRYPTO_LIBS) \
127         $(TOR_UTIL_LIBS) \
128         src/trunnel/libor-trunnel.a \
129         src/lib/libtor-trace.a
131 # Variants of the above for linking the testing variant of tor (for coverage
132 # and tests)
133 if UNITTESTS_ENABLED
134 TOR_INTERNAL_TESTING_LIBS = \
135         src/core/libtor-app-testing.a \
136         src/lib/libtor-compress-testing.a \
137         src/lib/libtor-evloop-testing.a \
138         $(TOR_CRYPTO_TESTING_LIBS) \
139         $(TOR_UTIL_TESTING_LIBS) \
140         src/trunnel/libor-trunnel-testing.a \
141         src/lib/libtor-trace.a
142 endif
144 TOR_LDFLAGS_CRYPTLIB=@TOR_LDFLAGS_openssl@
145 TOR_LIBS_CRYPTLIB=@TOR_OPENSSL_LIBS@
146 TOR_CFLAGS_CRYPTLIB=
147 if USE_NSS
148 TOR_CFLAGS_CRYPTLIB+=@NSS_CFLAGS@
149 TOR_LIBS_CRYPTLIB+=@NSS_LIBS@
150 endif
152 # All libraries used to link tor-cov
154 include src/include.am
155 include doc/include.am
156 include contrib/include.am
158 EXTRA_DIST+= \
159         ChangeLog                                       \
160         CONTRIBUTING                                    \
161         CODE_OF_CONDUCT                                 \
162         INSTALL                                         \
163         LICENSE                                         \
164         Makefile.nmake                                  \
165         README                                          \
166         ReleaseNotes                                    \
167         scripts/maint/checkIncludes.py                  \
168         scripts/maint/checkSpace.pl                     \
169         scripts/maint/practracker/exceptions.txt        \
170         scripts/maint/practracker/metrics.py            \
171         scripts/maint/practracker/practracker.py        \
172         scripts/maint/practracker/problem.py            \
173         scripts/maint/practracker/util.py
175 ## This tells etags how to find mockable function definitions.
176 AM_ETAGSFLAGS=--regex='{c}/MOCK_IMPL([^,]+,\W*\([a-zA-Z0-9_]+\)\W*,/\1/s'
178 if COVERAGE_ENABLED
179 TEST_CFLAGS=-fno-inline -fprofile-arcs -ftest-coverage
180 if DISABLE_ASSERTS_IN_UNIT_TESTS
181 TEST_CPPFLAGS=-DTOR_UNIT_TESTS -DTOR_COVERAGE -DDISABLE_ASSERTS_IN_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@
182 else
183 TEST_CPPFLAGS=-DTOR_UNIT_TESTS -DTOR_COVERAGE @TOR_MODULES_ALL_ENABLED@
184 endif
185 TEST_NETWORK_FLAGS=--coverage --hs-multi-client 1
186 else
187 TEST_CFLAGS=
188 TEST_CPPFLAGS=-DTOR_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@
189 TEST_NETWORK_FLAGS=--hs-multi-client 1
190 endif
191 TEST_NETWORK_WARNING_FLAGS=--quiet --only-warnings
193 if LIBFUZZER_ENABLED
194 TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div
195 # not "edge"
196 endif
198 TEST_NETWORK_ALL_LOG_DIR=$(top_builddir)/test_network_log
199 TEST_NETWORK_ALL_DRIVER_FLAGS=--color-tests yes
201 #install-data-local:
202 #       $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
204 # Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
205 # building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
206 RPMBUILD ?= rpmbuild
208 # Use automake's dist-gzip target to build the tarball
209 dist-rpm: dist-gzip
210         TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S");                                \
211         RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX");      \
212         mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
213         cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/;                  \
214         LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec;  \
215         cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .;                                     \
216         cp -fa "$$RPM_BUILD_DIR"/RPMS/* .;                                      \
217         rm -rf "$$RPM_BUILD_DIR";                                               \
218         echo "RPM build finished";                                              \
219         #end of dist-rpm
221 doxygen:
222         doxygen && cd doc/doxygen/latex && make
224 test: all
225         $(top_builddir)/src/test/test
227 shellcheck:
228         # Only use shellcheck if it is present
229         if command -v shellcheck; then \
230                 find $(top_srcdir)/scripts/ -name "*.sh" -exec shellcheck {} +; \
231                 if [ -d "$(top_srcdir)/scripts/test" ]; then \
232                         shellcheck $(top_srcdir)/scripts/test/cov-diff $(top_srcdir)/scripts/test/coverage; \
233                 fi; \
234         fi
236 check-local: check-spaces check-changes check-includes shellcheck
238 need-chutney-path:
239         @if test ! -d "$$CHUTNEY_PATH"; then \
240                 echo '$$CHUTNEY_PATH was not set.'; \
241                 if test -d $(top_srcdir)/../chutney -a -x $(top_srcdir)/../chutney/chutney; then \
242                         echo "Assuming test-network.sh will find" $(top_srcdir)/../chutney; \
243                 else \
244                         echo; \
245                         echo "To run these tests, git clone https://git.torproject.org/chutney.git ; export CHUTNEY_PATH=\`pwd\`/chutney"; \
246                         exit 1; \
247                 fi \
248         fi
250 # Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
251 # Chutney can be cloned from https://git.torproject.org/chutney.git .
252 test-network: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
253         $(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)
255 # Run all available tests using automake's test-driver
256 # only run IPv6 tests if we can ping6 ::1 (localhost)
257 # only run IPv6 tests if we can ping ::1 (localhost)
258 # some IPv6 tests will fail without an IPv6 DNS server (see #16971 and #17011)
259 # only run mixed tests if we have a tor-stable binary
260 # Try the syntax for BSD ping6, Linux ping6, and Linux ping -6,
261 # because they're incompatible
262 test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
263         mkdir -p $(TEST_NETWORK_ALL_LOG_DIR)
264         rm -f $(TEST_NETWORK_ALL_LOG_DIR)/*.log $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
265         @flavors="$(TEST_CHUTNEY_FLAVORS)"; \
266         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 \
267                 echo "ping6 ::1 or ping ::1 succeeded, running IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
268                 flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
269         else \
270                 echo "ping6 ::1 and ping ::1 failed, skipping IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
271                 skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
272         fi; \
273         if command -v tor-stable >/dev/null 2>&1; then \
274                 echo "tor-stable found, running mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
275                 flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
276         else \
277                 echo "tor-stable not found, skipping mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
278                 skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
279         fi; \
280         for f in $$skip_flavors; do \
281                 echo "SKIP: $$f"; \
282         done; \
283         for f in $$flavors; do \
284                 $(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); \
285                 $(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_WARNING_FLAGS); \
286         done; \
287         echo "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."; \
288         ! grep -q FAIL $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
290 need-stem-path:
291         @if test ! -d "$$STEM_SOURCE_DIR"; then \
292                 echo '$$STEM_SOURCE_DIR was not set.'; echo; \
293                 echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
294                 exit 1; \
295         fi
297 test-stem: need-stem-path $(TESTING_TOR_BINARY)
298         @$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --integ --log notice --target RUN_ALL;
300 test-stem-full: need-stem-path $(TESTING_TOR_BINARY)
301         @$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --all --log notice --target RUN_ALL,ONLINE -v;
303 test-full: need-stem-path need-chutney-path check test-network test-stem
305 test-full-online: need-stem-path need-chutney-path check test-network test-stem-full
307 # We can't delete the gcno files, because they are created when tor is compiled
308 reset-gcov:
309         rm -f $(top_builddir)/src/*/*.gcda $(top_builddir)/src/*/*/*.gcda \
310               $(top_builddir)/src/*/*.gcov $(top_builddir)/src/*/*/*.gcov
312 HTML_COVER_DIR=$(top_builddir)/coverage_html
313 coverage-html: all
314 if COVERAGE_ENABLED
315         test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
316         test -d "$(HTML_COVER_DIR)" || $(MKDIR_P) "$(HTML_COVER_DIR)"
317         lcov --rc lcov_branch_coverage=1 --directory $(top_builddir)/src --zerocounters
318         $(MAKE) reset-gcov
319         $(MAKE) check
320         lcov --capture --rc lcov_branch_coverage=1 --no-external --directory $(top_builddir) --base-directory $(top_srcdir) --output-file "$(HTML_COVER_DIR)/lcov.tmp"
321         lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
322         genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
323 else
324         @printf "Not configured with --enable-coverage, run ./configure --enable-coverage\n"
325 endif
327 coverage-html-full: all
328         test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
329         test -d "$(HTML_COVER_DIR)" || mkdir -p "$(HTML_COVER_DIR)"
330         lcov --rc lcov_branch_coverage=1 --directory ./src --zerocounters
331         $(MAKE) reset-gcov
332         $(MAKE) check
333         $(MAKE) test-stem-full
334         CHUTNEY_TOR=tor-cov CHUTNEY_TOR_GENCERT=tor-cov-gencert $(top_srcdir)/src/test/test-network.sh
335         CHUTNEY_TOR=tor-cov CHUTNEY_TOR_GENCERT=tor-cov-gencert $(top_srcdir)/src/test/test-network.sh --flavor hs
336         lcov --capture --rc lcov_branch_coverage=1 --no-external --directory . --output-file "$(HTML_COVER_DIR)/lcov.tmp"
337         lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
338         genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
340 # For scripts: avoid src/ext and src/trunnel.
341 OWNED_TOR_C_FILES=\
342                 $(top_srcdir)/src/lib/*/*.[ch] \
343                 $(top_srcdir)/src/core/*/*.[ch] \
344                 $(top_srcdir)/src/feature/*/*.[ch] \
345                 $(top_srcdir)/src/app/*/*.[ch] \
346                 $(top_srcdir)/src/test/*.[ch] \
347                 $(top_srcdir)/src/test/*/*.[ch] \
348                 $(top_srcdir)/src/tools/*.[ch]
350 check-spaces:
351 if USE_PERL
352         $(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \
353                 $(OWNED_TOR_C_FILES)
354 endif
356 check-includes:
357 if USEPYTHON
358         $(PYTHON) $(top_srcdir)/scripts/maint/checkIncludes.py
359 endif
361 check-best-practices:
362 if USEPYTHON
363         $(PYTHON) $(top_srcdir)/scripts/maint/practracker/practracker.py $(top_srcdir)
364 endif
366 practracker-regen:
367         $(PYTHON) $(top_srcdir)/scripts/maint/practracker/practracker.py --regen $(top_srcdir)
369 check-docs: all
370         $(PERL) $(top_builddir)/scripts/maint/checkOptionDocs.pl
372 check-logs:
373         $(top_srcdir)/scripts/maint/checkLogs.pl \
374                 $(top_srcdir)/src/*/*.[ch] | sort -n
376 .PHONY: check-typos
377 check-typos:
378         @if test -x "`which misspell 2>&1;true`"; then \
379                 echo "Checking for Typos ..."; \
380                 (misspell \
381                         $(top_srcdir)/src/[^e]*/*.[ch] \
382                         $(top_srcdir)/doc \
383                         $(top_srcdir)/contrib \
384                         $(top_srcdir)/scripts \
385                         $(top_srcdir)/README \
386                         $(top_srcdir)/ChangeLog \
387                         $(top_srcdir)/INSTALL \
388                         $(top_srcdir)/ReleaseNotes \
389                         $(top_srcdir)/LICENSE); \
390         else \
391                 echo "Tor can use misspell to check for typos."; \
392                 echo "It seems that you don't have misspell installed."; \
393                 echo "You can install the latest version of misspell here: https://github.com/client9/misspell#install"; \
394         fi
396 .PHONY: rustfmt
397 rustfmt:
398 if USE_RUST
399         @if test -x "`which cargo-fmt 2>&1;true`"; then \
400                 echo "Formatting Rust code ..."; \
401                 (cd "$(top_srcdir)/src/rust" && cargo fmt --all --); \
402         else \
403                 echo "Tor uses rustfmt (via cargo-fmt) to format Rust code."; \
404                 echo "However, it seems that you don't have rustfmt installed."; \
405                 printf "You can install rustfmt by following the directions here:"; \
406                 echo " https://github.com/rust-lang-nursery/rustfmt"; \
407         fi
408 endif
410 .PHONY: check-rustfmt
411 check-rustfmt:
412 if USE_RUST
413         @if test -x "`which cargo-fmt 2>&1;true`"; then \
414                 printf "Running rustfmt..."; \
415                 (cd "$(top_srcdir)/src/rust" && cargo fmt --all -- --check && echo "done.") || \
416                 (echo "**************** check-rustfmt failed. ****************"; \
417                  echo "   Run \`make rustfmt\` to apply the above changes."; \
418                  exit 1); \
419         else \
420                 echo "Tor uses rustfmt (via cargo-fmt) to format Rust code."; \
421                 echo "However, it seems that you don't have rustfmt installed."; \
422                 printf "You can install rustfmt by following the directions here:"; \
423                 echo " https://github.com/rust-lang-nursery/rustfmt"; \
424         fi
425 endif
427 .PHONY: clippy
428 clippy:
429 if USE_RUST
430         @if test -x "`which cargo-clippy 2>&1;true`"; then \
431                 echo "Running cargo clippy ..."; \
432                 echo "Prepare yourself for the onslaught of suggestions ..."; \
433                 (cd "$(top_srcdir)/src/rust" && cargo clippy); \
434         else \
435                 echo "Tor can use clippy to lint Rust code."; \
436                 echo "However, it seems that you don't have clippy installed."; \
437                 echo "You can install the latest version of clippy by following the directions here: https://github.com/rust-lang-nursery/rust-clippy"; \
438         fi
439 endif
441 .PHONY: check-changes
442 check-changes:
443 if USEPYTHON
444         @if test -d "$(top_srcdir)/changes"; then \
445                 PACKAGE_VERSION=$(PACKAGE_VERSION) $(PYTHON) $(top_srcdir)/scripts/maint/lintChanges.py $(top_srcdir)/changes; \
446                 fi
447 endif
449 .PHONY: update-versions
450 update-versions:
451         abs_top_srcdir="$(abs_top_srcdir)" $(PYTHON) $(top_srcdir)/scripts/maint/update_versions.py
453 .PHONY: callgraph
454 callgraph:
455         $(top_builddir)/scripts/maint/run_calltool.sh
457 version:
458         @echo "Tor @VERSION@"
459         @if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
460            echo -n "git: " ;\
461            (cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
462         fi
464 .PHONY: autostyle-ifdefs
465 autostyle-ifdefs:
466         $(PYTHON) scripts/maint/annotate_ifdef_directives $(OWNED_TOR_C_FILES)
468 .PHONY: autostyle-ifdefs
469 autostyle-operators:
470         $(PERL) scripts/coccinelle/test-operator-cleanup $(OWNED_TOR_C_FILES)
472 .PHONY: rectify-includes
473 rectify-includes:
474         $(PYTHON) scripts/maint/rectify_include_paths.py
476 .PHONY: update-copyright
477 update-copyright:
478         $(PERL) scripts/maint/updateCopyright.pl $(OWNED_TOR_C_FILES)
480 .PHONY: autostyle
481 autostyle: update-versions rustfmt autostyle-ifdefs rectify-includes
483 mostlyclean-local:
484         rm -f $(top_builddir)/src/*/*.gc{da,no} $(top_builddir)/src/*/*/*.gc{da,no}
485         rm -rf $(HTML_COVER_DIR)
486         rm -rf $(top_builddir)/doc/doxygen
487         rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
489 clean-local:
490         rm -rf $(top_builddir)/src/rust/target
491         rm -rf $(top_builddir)/src/rust/.cargo/registry
493 if USE_RUST
494 distclean-local: distclean-rust
495 endif
497 # This relies on some internal details of how automake implements
498 # distcheck.  We check two directories because automake-1.15 changed
499 # from $(distdir)/_build to $(distdir)/_build/sub.
500 show-distdir-testlog:
501         @if test -d "$(distdir)/_build/sub"; then \
502           cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
503         else \
504           cat $(distdir)/_build/$(TEST_SUITE_LOG); fi
506 # Similarly, this relies on automake internals to run file on an
507 # intermittent core file whose provenance is not known to us.  See
508 # ticket 26787.
509 show-distdir-core:
510         @if test -d "$(distdir)/_build/sub"; then \
511           file $(distdir)/_build/sub/core ; \
512         else \
513           file $(distdir)/_build/core; fi
515 show-libs:
516         @echo $(TOR_INTERNAL_LIBS)
518 show-testing-libs:
519         @echo $(TOR_INTERNAL_TESTING_LIBS)