From eb4c8a81033e15c37a3e87b2ffb1a1f02ed5b776 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Mon, 10 Oct 2016 08:13:58 +0200 Subject: [PATCH] fixed distcheck --- ccid/src/Makefile.am | 8 +- pcsc-relay/src/Makefile.am | 6 +- virtualsmartcard/Makefile.am | 1 + virtualsmartcard/configure.ac | 7 +- .../src/pcsclite-vpcd/Makefile.am | 1 + .../src/pcsclite-vpcd/PCSC/debug.c | 132 ------------------ virtualsmartcard/src/vpicc/Makefile.am | 4 +- 7 files changed, 15 insertions(+), 144 deletions(-) delete mode 100644 virtualsmartcard/src/pcsclite-vpcd/PCSC/debug.c diff --git a/ccid/src/Makefile.am b/ccid/src/Makefile.am index 23d2a3a..91ee927 100644 --- a/ccid/src/Makefile.am +++ b/ccid/src/Makefile.am @@ -10,10 +10,10 @@ do_subst = $(SED) \ BUILT_SOURCES = cmdline.h cmdline.c EXTRA_DIST = ccid-emulator.ggo ccid-emulator.ggo.in -EXTRA_DIST += $(shell find $(top_srcdir)/src/OpenSC/src -path '*/.git' -prune -o -type f -a -name '*.h' -print) +EXTRA_DIST += $(shell find $(top_srcdir)/src/OpenSC/src -path '*/.git' -prune -o -type f -a \( -name '*.h' -o -name 'apdu.c' -o -name 'card.c' \) -print) MAINTAINERCLEANFILES = $(BUILT_SOURCES) ccid-emulator.ggo $(dist_man1_MANS) -dist_man1_MANS = $(abs_builddir)/ccid-emulator.1 +dist_man1_MANS = ccid-emulator.1 ccid_emulator_SOURCES = ccid.c usbstring.c usb.c scutil.c $(BUILT_SOURCES) ccid_emulator_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS) $(PTHREAD_LIBS) @@ -29,13 +29,13 @@ ccid-emulator.ggo: ccid-emulator.ggo.in $(do_subst) < $< > $(srcdir)/$@ -$(abs_builddir)/ccid-emulator.1: +ccid-emulator.1: $(HELP2MAN) \ --output=$@ \ --no-info \ --source='$(PACKAGE_STRING)' \ --version-string='$(PACKAGE) $(VERSION)' \ - $(srcdir)/ccid-emulator + $(builddir)/ccid-emulator bin_PROGRAMS = ccid-emulator diff --git a/pcsc-relay/src/Makefile.am b/pcsc-relay/src/Makefile.am index 05454ff..c35daef 100644 --- a/pcsc-relay/src/Makefile.am +++ b/pcsc-relay/src/Makefile.am @@ -13,17 +13,17 @@ EXTRA_DIST = pcsc-relay.ggo pcsc-relay.ggo.in EXTRA_DIST += picc.py MAINTAINERCLEANFILES = $(BUILT_SOURCES) npa-tool.ggo $(dist_man1_MANS) -dist_man1_MANS = $(abs_builddir)/pcsc-relay.1 +dist_man1_MANS = pcsc-relay.1 -$(abs_builddir)/pcsc-relay.1: +pcsc-relay.1: $(HELP2MAN) \ --output=$@ \ --no-info \ --no-discard-stderr \ --source='$(PACKAGE_STRING)' \ --version-string='$(PACKAGE) $(VERSION)' \ - $(srcdir)/pcsc-relay + $(builddir)/pcsc-relay bin_PROGRAMS = pcsc-relay diff --git a/virtualsmartcard/Makefile.am b/virtualsmartcard/Makefile.am index 3c579d7..48b39c5 100644 --- a/virtualsmartcard/Makefile.am +++ b/virtualsmartcard/Makefile.am @@ -2,6 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src doc npa-example-data MacOSX EXTRA_DIST = test_vicc_with_npa-tool.sh test_vicc_with_handler_test.sh docs +DISTCHECK_CONFIGURE_FLAGS = --enable-libpcsclite osx: $(MAKE) -C MacOSX $@ diff --git a/virtualsmartcard/configure.ac b/virtualsmartcard/configure.ac index 3642691..4091c5a 100644 --- a/virtualsmartcard/configure.ac +++ b/virtualsmartcard/configure.ac @@ -141,9 +141,10 @@ if test "${libpcsclite}" = no ; then fi fi else - builddir="`pwd`" - PCSC_CFLAGS="-DNO_LOG -I${builddir}/${srcdir}/src/pcsclite-vpcd/PCSC -I${builddir}/${srcdir}/src/pcsclite-vpcd" - PCSC_LIBS="$builddir/src/pcsclite-vpcd/libpcsclite.la" + builddir="`pwd`" + abs_srcdir="`cd ${srcdir}; pwd`" + PCSC_CFLAGS="-DNO_LOG -I${abs_srcdir}/src/pcsclite-vpcd/PCSC -I${builddir}/src/pcsclite-vpcd/PCSC" + PCSC_LIBS="${builddir}/src/pcsclite-vpcd/libpcsclite.la" AC_SUBST(PCSC_CFLAGS) AC_SUBST(PCSC_LIBS) fi diff --git a/virtualsmartcard/src/pcsclite-vpcd/Makefile.am b/virtualsmartcard/src/pcsclite-vpcd/Makefile.am index 77de794..fa9f9cb 100644 --- a/virtualsmartcard/src/pcsclite-vpcd/Makefile.am +++ b/virtualsmartcard/src/pcsclite-vpcd/Makefile.am @@ -12,6 +12,7 @@ noinst_HEADERS = misc.h nobase_include_HEADERS = \ PCSC/pcsclite.h \ PCSC/winscard.h \ + PCSC/ifdhandler.h \ PCSC/wintypes.h pkgconfigdir = $(libdir)/pkgconfig diff --git a/virtualsmartcard/src/pcsclite-vpcd/PCSC/debug.c b/virtualsmartcard/src/pcsclite-vpcd/PCSC/debug.c deleted file mode 100644 index cc820b0..0000000 --- a/virtualsmartcard/src/pcsclite-vpcd/PCSC/debug.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * MUSCLE SmartCard Development ( http://www.linuxnet.com ) - * - * Copyright (C) 1999-2002 - * David Corcoran - * Copyright (C) 2002-2011 - * Ludovic Rousseau - * - * $Id: debug.c 6551 2013-03-06 13:44:17Z rousseau $ - */ - -/** - * @file - * @brief This handles debugging for libpcsclite. - */ - -#include "config.h" -#include -#include -#include -#include -#include - -#include "debuglog.h" -#include "strlcpycat.h" - -#define DEBUG_BUF_SIZE 2048 - -#ifdef NO_LOG - -void log_msg(const int priority, const char *fmt, ...) -{ - (void)priority; - (void)fmt; -} - -#else - -/** default level is quiet to avoid polluting fd 2 (possibly NOT stderr) */ -static char LogLevel = PCSC_LOG_CRITICAL+1; - -static signed char LogDoColor = 0; /**< no color by default */ - -static void log_init(void) -{ - char *e; - -#ifdef LIBPCSCLITE - e = getenv("PCSCLITE_DEBUG"); -#else - e = getenv("MUSCLECARD_DEBUG"); -#endif - if (e) - LogLevel = atoi(e); - - /* log to stderr and stderr is a tty? */ - if (isatty(fileno(stderr))) - { - char *term; - - term = getenv("TERM"); - if (term) - { - const char *terms[] = { "linux", "xterm", "xterm-color", "Eterm", "rxvt", "rxvt-unicode" }; - unsigned int i; - - /* for each known color terminal */ - for (i = 0; i < sizeof(terms) / sizeof(terms[0]); i++) - { - /* we found a supported term? */ - if (0 == strcmp(terms[i], term)) - { - LogDoColor = 1; - break; - } - } - } - } -} /* log_init */ - -void log_msg(const int priority, const char *fmt, ...) -{ - char DebugBuffer[DEBUG_BUF_SIZE]; - va_list argptr; - static int is_initialized = 0; - - if (!is_initialized) - { - log_init(); - is_initialized = 1; - } - - if (priority < LogLevel) /* log priority lower than threshold? */ - return; - - va_start(argptr, fmt); - (void)vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr); - va_end(argptr); - - { - if (LogDoColor) - { - const char *color_pfx = "", *color_sfx = "\33[0m"; - - switch (priority) - { - case PCSC_LOG_CRITICAL: - color_pfx = "\33[01;31m"; /* bright + Red */ - break; - - case PCSC_LOG_ERROR: - color_pfx = "\33[35m"; /* Magenta */ - break; - - case PCSC_LOG_INFO: - color_pfx = "\33[34m"; /* Blue */ - break; - - case PCSC_LOG_DEBUG: - color_pfx = ""; /* normal (black) */ - color_sfx = ""; - break; - } - fprintf(stderr, "%s%s%s\n", color_pfx, DebugBuffer, color_sfx); - } - else - fprintf(stderr, "%s\n", DebugBuffer); - } -} /* log_msg */ - -#endif - diff --git a/virtualsmartcard/src/vpicc/Makefile.am b/virtualsmartcard/src/vpicc/Makefile.am index b5e2c95..add04c1 100644 --- a/virtualsmartcard/src/vpicc/Makefile.am +++ b/virtualsmartcard/src/vpicc/Makefile.am @@ -37,8 +37,8 @@ $(builddir)/vicc: vicc.in Makefile $(do_subst) < $(srcdir)/vicc.in > $(builddir)/vicc chmod +x $(builddir)/vicc -$(builddir)/vicc.1: vicc.in +vicc.1: vicc.in $(HELP2MAN) \ --no-discard-stderr \ --output=$@ \ - $(srcdir)/vicc + $(builddir)/vicc