2018-07-05 16:04:32 -04:00
|
|
|
|
2018-04-03 15:06:34 -04:00
|
|
|
#
|
2020-01-08 20:50:02 -05:00
|
|
|
# Modules are conditionally compiled in tor starting here. We add the C files
|
2018-04-27 11:33:22 -04:00
|
|
|
# only if the modules has been enabled at configure time. We always add the
|
|
|
|
# source files of every module to libtor-testing.a so we can build the unit
|
2018-06-19 23:10:12 +02:00
|
|
|
# tests for everything. See the UNITTESTS_ENABLED branch below.
|
2018-04-03 15:06:34 -04:00
|
|
|
#
|
2018-06-21 11:01:10 -04:00
|
|
|
LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
|
2018-04-03 15:06:34 -04:00
|
|
|
|
2019-12-15 18:10:11 -05:00
|
|
|
src_core_libtor_app_a_SOURCES = \
|
|
|
|
$(LIBTOR_APP_A_SOURCES) \
|
|
|
|
$(LIBTOR_APP_A_STUB_SOURCES)
|
2020-01-13 09:34:17 -05:00
|
|
|
|
2018-06-02 12:53:04 +03:00
|
|
|
if UNITTESTS_ENABLED
|
2018-06-19 23:10:12 +02:00
|
|
|
|
|
|
|
# Add the sources of the modules that are needed for tests to work here.
|
2019-10-18 13:28:02 +10:00
|
|
|
LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_RELAY_SOURCES)
|
2020-01-08 21:13:29 -05:00
|
|
|
LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRCACHE_SOURCES)
|
2018-06-21 11:01:10 -04:00
|
|
|
LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
|
2018-06-19 23:10:12 +02:00
|
|
|
|
2018-07-05 16:04:32 -04:00
|
|
|
src_core_libtor_app_testing_a_SOURCES = $(LIBTOR_APP_TESTING_A_SOURCES)
|
2018-06-02 12:53:04 +03:00
|
|
|
else
|
2018-07-05 16:04:32 -04:00
|
|
|
src_core_libtor_app_testing_a_SOURCES =
|
2018-06-02 12:53:04 +03:00
|
|
|
endif
|
2013-06-06 14:56:05 -04:00
|
|
|
|
2015-08-18 04:30:02 +02:00
|
|
|
AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\"" \
|
|
|
|
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
|
|
|
|
-DBINDIR="\"$(bindir)\""
|
2012-08-02 23:31:43 +10:00
|
|
|
|
2018-07-05 16:04:32 -04:00
|
|
|
src_core_libtor_app_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
|
|
|
|
src_core_libtor_app_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
|
2013-07-09 12:37:11 -04:00
|
|
|
|
2012-08-27 10:00:22 -04:00
|
|
|
micro-revision.i: FORCE
|
2015-05-18 11:29:07 -04:00
|
|
|
$(AM_V_at)rm -f micro-revision.tmp; \
|
2016-12-04 21:16:59 -06:00
|
|
|
if test -r "$(top_srcdir)/.git" && \
|
2015-02-25 16:04:02 +01:00
|
|
|
test -x "`which git 2>&1;true`"; then \
|
|
|
|
HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
|
|
|
|
echo \"$$HASH\" > micro-revision.tmp; \
|
|
|
|
fi; \
|
|
|
|
if test ! -f micro-revision.tmp; then \
|
|
|
|
if test ! -f micro-revision.i; then \
|
|
|
|
echo '""' > micro-revision.i; \
|
|
|
|
fi; \
|
|
|
|
elif test ! -f micro-revision.i || \
|
|
|
|
test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
|
|
|
|
mv micro-revision.tmp micro-revision.i; \
|
|
|
|
fi; \
|
|
|
|
rm -f micro-revision.tmp; \
|
|
|
|
true
|
2012-08-02 23:31:43 +10:00
|
|
|
|
2018-07-05 16:52:12 -04:00
|
|
|
CLEANFILES+= micro-revision.i micro-revision.tmp
|
2012-08-02 23:31:43 +10:00
|
|
|
|
2012-08-23 13:14:41 -04:00
|
|
|
FORCE:
|