3 # Modules are conditionally compiled in tor starting here. We add the C files
4 # only if the modules has been enabled at configure time. We always add the
5 # source files of every module to libtor-testing.a so we can build the unit
6 # tests for everything. See the UNITTESTS_ENABLED branch below.
8 LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
10 src_core_libtor_app_a_SOURCES = \
11 $(LIBTOR_APP_A_SOURCES) \
12 $(LIBTOR_APP_A_STUB_SOURCES)
16 # Add the sources of the modules that are needed for tests to work here.
17 LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_RELAY_SOURCES)
18 LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRCACHE_SOURCES)
19 LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
21 src_core_libtor_app_testing_a_SOURCES = $(LIBTOR_APP_TESTING_A_SOURCES)
23 src_core_libtor_app_testing_a_SOURCES =
26 AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\"" \
27 -DLOCALSTATEDIR="\"$(localstatedir)\"" \
28 -DBINDIR="\"$(bindir)\""
30 src_core_libtor_app_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
31 src_core_libtor_app_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
33 micro-revision.i: FORCE
34 $(AM_V_at)rm -f micro-revision.tmp; \
35 if test -r "$(top_srcdir)/.git" && \
36 test -x "`which git 2>&1;true`"; then \
37 HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
38 echo \"$$HASH\" > micro-revision.tmp; \
40 if test ! -f micro-revision.tmp; then \
41 if test ! -f micro-revision.i; then \
42 echo '""' > micro-revision.i; \
44 elif test ! -f micro-revision.i || \
45 test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
46 mv micro-revision.tmp micro-revision.i; \
48 rm -f micro-revision.tmp; \
51 CLEANFILES+= micro-revision.i micro-revision.tmp