[pkg-opensc-commit] [libp11] 53/67: Fixed "make dist" and "make distcheck"

Eric Dorland eric at moszumanska.debian.org
Sat Jan 30 05:34:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit bd52f4aa5a361fadf45aacbbf33d079d8ee054b9
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Mon Jan 18 13:48:26 2016 +0100

    Fixed "make dist" and "make distcheck"
---
 .gitignore                 | 14 +++++++++-----
 Makefile.am                |  3 ++-
 examples/Makefile.am       |  2 +-
 src/Makefile.am            |  3 +--
 tests/Makefile.am          |  7 ++-----
 tests/common.sh            | 10 +++++++---
 tests/testfork.softhsm     |  3 +--
 tests/testlistkeys.softhsm |  5 ++---
 tests/testpkcs11.softhsm   |  7 +++----
 9 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/.gitignore b/.gitignore
index d882eac..fb12f4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,7 +42,7 @@ stamp-h*
 *.pdb
 *.rej
 *.u
-*.rc
+*.res
 *.pc
 *~
 *.gz
@@ -54,12 +54,16 @@ m4/ltsugar.m4
 m4/ltversion.m4
 m4/lt~obsolete.m4
 
-tests/auth
-tests/*.log
-tests/*.trs
-
 examples/auth
 examples/decrypt
 examples/getrandom
+examples/rawrsasign
+examples/listkeys
+
+test-driver
+tests/fork-test
+tests/*.log
+tests/*.trs
+tests/output.*
 
 doc/doxygen.conf
diff --git a/Makefile.am b/Makefile.am
index 2632da0..7fd0c2b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,8 @@ dist_noinst_DATA = COPYING bootstrap
 
 dist_doc_DATA = NEWS
 
-SUBDIRS = src doc tests examples
+# Prerequisites must be first on the list
+SUBDIRS = src doc examples tests
 
 # Allow detection of packaged tarball
 dist-hook:
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 33c8163..7bd0fa3 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/src \
 
 EXTRA_DIST = README
 
-noinst_PROGRAMS = auth decrypt getrandom listkeys
+noinst_PROGRAMS = auth decrypt getrandom listkeys rawrsasign
 
 LDADD = ../src/libp11.la $(OPENSSL_LIBS)
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 6a5b42e..8935868 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,6 @@
 include $(top_srcdir)/ltrc.inc
 
-MAINTAINERCLEANFILES = \
-	$(srcdir)/Makefile.in $(srcdir)/versioninfo.rc
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 CLEANFILES = libp11.pc
 EXTRA_DIST = Makefile.mak versioninfo.rc.in
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6ef851a..353b267 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,12 +9,9 @@ AM_CPPFLAGS = \
 AM_LDFLAGS = -no-install
 LDADD = ../src/libp11.la $(OPENSSL_LIBS)
 
-auth_SOURCES = ../examples/auth.c
-rawrsasign_SOURCES = ../examples/rawrsasign.c
-listkeys_SOURCES = ../examples/listkeys.c
-
-check_PROGRAMS = auth fork-test rawrsasign listkeys
+check_PROGRAMS = fork-test
 dist_check_SCRIPTS = testpkcs11.softhsm testfork.softhsm testlistkeys.softhsm
+dist_check_DATA = cert.der key.der pubkey.der
 
 TESTS = $(dist_check_SCRIPTS)
 
diff --git a/tests/common.sh b/tests/common.sh
index 7f70e63..592558c 100755
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -17,6 +17,10 @@
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
+echo "Current directory: $(pwd)"
+echo "Source directory: ${srcdir}"
+echo "Output directory: ${outdir}"
+
 mkdir -p $outdir
 
 for i in /usr/lib64/pkcs11 /usr/lib/softhsm /usr/local/lib/softhsm /opt/local/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm;do
@@ -90,17 +94,17 @@ PUK=1234
 init_card $PIN $PUK
 
 # generate key in token
-pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${file_dir}/key.der -y privkey >/dev/null
+pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${srcdir}/key.der -y privkey >/dev/null
 if test $? != 0;then
 	exit 1;
 fi
 
-pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${file_dir}/pubkey.der -y pubkey >/dev/null
+pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${srcdir}/pubkey.der -y pubkey >/dev/null
 if test $? != 0;then
 	exit 1;
 fi
 
-pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${file_dir}/cert.der -y cert >/dev/null
+pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${srcdir}/cert.der -y cert >/dev/null
 if test $? != 0;then
 	exit 1;
 fi
diff --git a/tests/testfork.softhsm b/tests/testfork.softhsm
index 5d463be..c08ca56 100755
--- a/tests/testfork.softhsm
+++ b/tests/testfork.softhsm
@@ -17,8 +17,7 @@
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-outdir="${srcdir}/output.$$"
-file_dir="${srcdir:-./}"
+outdir="output.$$"
 
 . ${srcdir}/common.sh
 
diff --git a/tests/testlistkeys.softhsm b/tests/testlistkeys.softhsm
index 34da8ae..47c6bf4 100755
--- a/tests/testlistkeys.softhsm
+++ b/tests/testlistkeys.softhsm
@@ -17,12 +17,11 @@
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-outdir="${srcdir}/output.$$"
-file_dir="${srcdir:-./}"
+outdir="output.$$"
 
 . ${srcdir}/common.sh
 
-./listkeys $ADDITIONAL_PARAM $PIN
+../examples/listkeys $ADDITIONAL_PARAM $PIN
 if test $? != 0;then
 	exit 1;
 fi
diff --git a/tests/testpkcs11.softhsm b/tests/testpkcs11.softhsm
index f4d75d8..fe55fb7 100755
--- a/tests/testpkcs11.softhsm
+++ b/tests/testpkcs11.softhsm
@@ -18,18 +18,17 @@
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-outdir="${srcdir}/output.$$"
-file_dir="${srcdir:-./}"
+outdir="output.$$"
 
 . ${srcdir}/common.sh
 
-./auth $ADDITIONAL_PARAM $PIN
+../examples/auth $ADDITIONAL_PARAM $PIN
 if test $? != 0;then
 	echo "Basic PKCS #11 test test failed"
 	exit 1;
 fi
 
-./rawrsasign $ADDITIONAL_PARAM $PIN
+../examples/rawrsasign $ADDITIONAL_PARAM $PIN
 if test $? != 0;then
 	echo "Raw RSA signature test failed"
 	exit 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list