Simplify AM_CPPFLAGS include setup

We had accumulated a bunch of cruft here.  Now let's only include
src and src/ext.  (exception: src/trunnel is autogenerated code, and
need to include src/trunnel.)

This commit will break the build hard.  The next commit will fix it.
This commit is contained in:
Nick Mathewson 2018-06-20 09:25:50 -04:00
parent 178b738be0
commit 257b280776
7 changed files with 12 additions and 30 deletions

View File

@ -15,7 +15,11 @@ TESTS=
noinst_PROGRAMS=
DISTCLEANFILES=
bin_SCRIPTS=
AM_CPPFLAGS=
AM_CPPFLAGS=\
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/ext \
-I$(top_srcdir)/src/ext/trunnel
AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
SHELL=@SHELL@

View File

@ -21,16 +21,6 @@ AC_CANONICAL_HOST
PKG_PROG_PKG_CONFIG
if test -f "/etc/redhat-release"; then
if test -f "/usr/kerberos/include"; then
CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
fi
fi
# Not a no-op; we want to make sure that CPPFLAGS is set before we use
# the += operator on it in src/or/Makefile.am
CPPFLAGS="$CPPFLAGS -I\${top_srcdir}/src/common"
AC_ARG_ENABLE(openbsd-malloc,
AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only]))
AC_ARG_ENABLE(static-openssl,

View File

@ -15,9 +15,6 @@ endif
EXTRA_DIST += src/common/Makefile.nmake
#CFLAGS = -Wall -Wpointer-arith -O2
AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel
if USE_OPENBSD_MALLOC
libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
else
@ -214,4 +211,3 @@ COMMONHEADERS = \
src/common/workqueue.h
noinst_HEADERS+= $(COMMONHEADERS)

View File

@ -142,7 +142,6 @@ src_or_libtor_testing_a_SOURCES =
endif
src_or_tor_SOURCES = src/or/tor_main.c
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
src/or/tor_main.$(OBJEXT) \
src/or/src_or_tor_cov-tor_main.$(OBJEXT): micro-revision.i

View File

@ -71,10 +71,8 @@ endif
src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
-DBINDIR="\"$(bindir)\"" \
-I"$(top_srcdir)/src/or" -I"$(top_srcdir)/src/ext" \
-I"$(top_srcdir)/src/trunnel" \
-I"$(top_srcdir)/src/ext/trunnel" \
-DTOR_UNIT_TESTS
-DTOR_UNIT_TESTS \
$(AM_CPPFLAGS)
# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
# This seems to matter nowhere but on Windows, but I assure you that it
@ -327,7 +325,7 @@ src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
@CURVE25519_LIBS@ @TOR_LZMA_LIBS@
src_test_test_ntor_cl_AM_CPPFLAGS = \
-I"$(top_srcdir)/src/or"
$(AM_CPPFLAGS)
src_test_test_hs_ntor_cl_SOURCES = src/test/test_hs_ntor_cl.c
src_test_test_hs_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
@ -337,7 +335,7 @@ src_test_test_hs_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
src_test_test_hs_ntor_cl_AM_CPPFLAGS = \
-I"$(top_srcdir)/src/or"
$(AM_CPPFLAGS)
noinst_PROGRAMS += src/test/test-bt-cl

View File

@ -1,6 +1,3 @@
# Include the src/ so we can use the trace/events.h statement when including
# any file in that directory.
AM_CPPFLAGS += -I$(srcdir)/src
noinst_LIBRARIES += \
src/trace/libor-trace.a

View File

@ -6,8 +6,6 @@ noinst_LIBRARIES += \
src/trunnel/libor-trunnel-testing.a
endif
AM_CPPFLAGS += -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel
TRUNNELINPUTS = \
src/trunnel/ed25519_cert.trunnel \
src/trunnel/link_handshake.trunnel \
@ -39,7 +37,8 @@ TRUNNELHEADERS = \
src/trunnel/channelpadding_negotiation.h
src_trunnel_libor_trunnel_a_SOURCES = $(TRUNNELSOURCES)
src_trunnel_libor_trunnel_a_CPPFLAGS = -DTRUNNEL_LOCAL_H $(AM_CPPFLAGS)
src_trunnel_libor_trunnel_a_CPPFLAGS = \
-DTRUNNEL_LOCAL_H $(AM_CPPFLAGS) -I$(top_srcdir)/src/trunnel
if UNITTESTS_ENABLED
src_trunnel_libor_trunnel_testing_a_SOURCES = $(TRUNNELSOURCES)
@ -54,4 +53,3 @@ noinst_HEADERS+= $(TRUNNELHEADERS)
EXTRA_DIST += \
src/trunnel/README