fixed distcheck
This commit is contained in:
@@ -10,10 +10,10 @@ do_subst = $(SED) \
|
|||||||
BUILT_SOURCES = cmdline.h cmdline.c
|
BUILT_SOURCES = cmdline.h cmdline.c
|
||||||
|
|
||||||
EXTRA_DIST = ccid-emulator.ggo ccid-emulator.ggo.in
|
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)
|
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_SOURCES = ccid.c usbstring.c usb.c scutil.c $(BUILT_SOURCES)
|
||||||
ccid_emulator_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS) $(PTHREAD_LIBS)
|
ccid_emulator_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS) $(PTHREAD_LIBS)
|
||||||
@@ -29,13 +29,13 @@ ccid-emulator.ggo: ccid-emulator.ggo.in
|
|||||||
$(do_subst) < $< > $(srcdir)/$@
|
$(do_subst) < $< > $(srcdir)/$@
|
||||||
|
|
||||||
|
|
||||||
$(abs_builddir)/ccid-emulator.1:
|
ccid-emulator.1:
|
||||||
$(HELP2MAN) \
|
$(HELP2MAN) \
|
||||||
--output=$@ \
|
--output=$@ \
|
||||||
--no-info \
|
--no-info \
|
||||||
--source='$(PACKAGE_STRING)' \
|
--source='$(PACKAGE_STRING)' \
|
||||||
--version-string='$(PACKAGE) $(VERSION)' \
|
--version-string='$(PACKAGE) $(VERSION)' \
|
||||||
$(srcdir)/ccid-emulator
|
$(builddir)/ccid-emulator
|
||||||
|
|
||||||
|
|
||||||
bin_PROGRAMS = ccid-emulator
|
bin_PROGRAMS = ccid-emulator
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ EXTRA_DIST = pcsc-relay.ggo pcsc-relay.ggo.in
|
|||||||
EXTRA_DIST += picc.py
|
EXTRA_DIST += picc.py
|
||||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES) npa-tool.ggo $(dist_man1_MANS)
|
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) \
|
$(HELP2MAN) \
|
||||||
--output=$@ \
|
--output=$@ \
|
||||||
--no-info \
|
--no-info \
|
||||||
--no-discard-stderr \
|
--no-discard-stderr \
|
||||||
--source='$(PACKAGE_STRING)' \
|
--source='$(PACKAGE_STRING)' \
|
||||||
--version-string='$(PACKAGE) $(VERSION)' \
|
--version-string='$(PACKAGE) $(VERSION)' \
|
||||||
$(srcdir)/pcsc-relay
|
$(builddir)/pcsc-relay
|
||||||
|
|
||||||
|
|
||||||
bin_PROGRAMS = pcsc-relay
|
bin_PROGRAMS = pcsc-relay
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
|
|||||||
SUBDIRS = src doc npa-example-data MacOSX
|
SUBDIRS = src doc npa-example-data MacOSX
|
||||||
|
|
||||||
EXTRA_DIST = test_vicc_with_npa-tool.sh test_vicc_with_handler_test.sh docs
|
EXTRA_DIST = test_vicc_with_npa-tool.sh test_vicc_with_handler_test.sh docs
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS = --enable-libpcsclite
|
||||||
|
|
||||||
osx:
|
osx:
|
||||||
$(MAKE) -C MacOSX $@
|
$(MAKE) -C MacOSX $@
|
||||||
|
|||||||
@@ -141,9 +141,10 @@ if test "${libpcsclite}" = no ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
builddir="`pwd`"
|
builddir="`pwd`"
|
||||||
PCSC_CFLAGS="-DNO_LOG -I${builddir}/${srcdir}/src/pcsclite-vpcd/PCSC -I${builddir}/${srcdir}/src/pcsclite-vpcd"
|
abs_srcdir="`cd ${srcdir}; pwd`"
|
||||||
PCSC_LIBS="$builddir/src/pcsclite-vpcd/libpcsclite.la"
|
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_CFLAGS)
|
||||||
AC_SUBST(PCSC_LIBS)
|
AC_SUBST(PCSC_LIBS)
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ noinst_HEADERS = misc.h
|
|||||||
nobase_include_HEADERS = \
|
nobase_include_HEADERS = \
|
||||||
PCSC/pcsclite.h \
|
PCSC/pcsclite.h \
|
||||||
PCSC/winscard.h \
|
PCSC/winscard.h \
|
||||||
|
PCSC/ifdhandler.h \
|
||||||
PCSC/wintypes.h
|
PCSC/wintypes.h
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
|||||||
@@ -1,132 +0,0 @@
|
|||||||
/*
|
|
||||||
* MUSCLE SmartCard Development ( http://www.linuxnet.com )
|
|
||||||
*
|
|
||||||
* Copyright (C) 1999-2002
|
|
||||||
* David Corcoran <corcoran@linuxnet.com>
|
|
||||||
* Copyright (C) 2002-2011
|
|
||||||
* Ludovic Rousseau <ludovic.rousseau@free.fr>
|
|
||||||
*
|
|
||||||
* $Id: debug.c 6551 2013-03-06 13:44:17Z rousseau $
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* @brief This handles debugging for libpcsclite.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
@@ -37,8 +37,8 @@ $(builddir)/vicc: vicc.in Makefile
|
|||||||
$(do_subst) < $(srcdir)/vicc.in > $(builddir)/vicc
|
$(do_subst) < $(srcdir)/vicc.in > $(builddir)/vicc
|
||||||
chmod +x $(builddir)/vicc
|
chmod +x $(builddir)/vicc
|
||||||
|
|
||||||
$(builddir)/vicc.1: vicc.in
|
vicc.1: vicc.in
|
||||||
$(HELP2MAN) \
|
$(HELP2MAN) \
|
||||||
--no-discard-stderr \
|
--no-discard-stderr \
|
||||||
--output=$@ \
|
--output=$@ \
|
||||||
$(srcdir)/vicc
|
$(builddir)/vicc
|
||||||
|
|||||||
Reference in New Issue
Block a user