build-sys: fix make distcheck

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-08-02 18:15:02 +02:00 committed by Stefan Berger
parent 1d918e5426
commit bb5d837cf8
4 changed files with 13 additions and 8 deletions

View File

@ -40,3 +40,4 @@ EXTRA_DIST = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtpms.pc
DISTCHECK_CONFIGURE_FLAGS = --with-openssl --with-tpm2

View File

@ -62,3 +62,5 @@ man3_MANS += \
--section=3 $< > $@
EXTRA_DIST = $(man3_MANS) $(man3_PODS)
CLEANFILES = *.3

View File

@ -134,7 +134,6 @@ noinst_HEADERS = \
tpm12/tpm_time.h \
tpm12/tpm_transport.h \
tpm12/tpm_ver.h
if LIBTPMS_USE_FREEBL
@ -520,22 +519,22 @@ noinst_HEADERS += \
tpm2/crypto/openssl/TpmToOsslSym.h
libtpms_tpm2_la_CFLAGS += \
-I tpm2 \
-I tpm2/crypto \
-I tpm2/crypto/openssl
-I $(srcdir)/tpm2 \
-I $(srcdir)/tpm2/crypto \
-I $(srcdir)/tpm2/crypto/openssl
endif # LIBTPMS_USE_OPENSSL
# some of the original TPM2 files have been modified; in case of an update
# we do not want to loose these modifications
check:
n=`grep "TPM_LIBTPMS_CALLBACK" $(libtpms_tpm2_la_SOURCES) | wc -l`; \
n=`cd $(srcdir) && grep "TPM_LIBTPMS_CALLBACK" $(libtpms_tpm2_la_SOURCES) | wc -l`; \
exp=20; \
if test $$n -ne $$exp; then \
echo "TPM_LIBTPMS_CALLBACK occurrence has changed to $$n from $$exp"; \
exit 1; \
fi; \
n=`grep TPM2_GetBufferSize tpm2/Implementation.h | grep -E "^#define" | wc -l`; \
n=`cd $(srcdir) && grep TPM2_GetBufferSize tpm2/Implementation.h | grep -E "^#define" | wc -l`; \
exp=2; \
if test $$n -ne $$exp; then \
echo "Lost patches to tpm2/Implementation.h ?"; \
@ -586,8 +585,11 @@ check-local:
*) ADDLIBS="" ;; \
esac; \
$(CC) $(LDFLAGS_ARCH) -nostdlib -L./.libs -ltpms $$ADDLIBS 2>/dev/null
rm a.out
EXTRA_DIST = \
tpm12/tpm_crypto_freebl.c \
tpm12/tpm_crypto.c \
libtpms.syms
CLEANFILES = a.out

View File

@ -4,8 +4,8 @@
# For the license, see the LICENSE file in the root directory.
#
AM_CFLAGS = -I../include $(SANITIZERS)
AM_LDFLAGS = -ltpms -L../src/.libs $(SANITIZERS)
AM_CFLAGS = -I$(top_srcdir)/include $(SANITIZERS)
AM_LDFLAGS = -ltpms -L$(top_builddir)/src/.libs $(SANITIZERS)
check_PROGRAMS = base64decode nvram_offsets
TESTS = base64decode.sh nvram_offsets