2002-09-03 Neal H. Walfield <neal@cs.uml.edu>
[gnupg.git] / tests / Makefile.am
1 # Makefile.am -tests makefile for libxtime
2 #       Copyright (C) 2002 Free Software Foundation, Inc.
3
4 # This file is part of GnuPG.
5
6 # GnuPG is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # GnuPG is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20 ## Process this file with automake to produce Makefile.in
21
22 GPGSM = ../sm/gpgsm
23
24 # We can't unset a variable here so we unset GPG_AGENT_INFO in runtest
25 TESTS_ENVIRONMENT = GNUPGHOME=`pwd` LC_ALL=C GPGSM=$(GPGSM) $(srcdir)/runtest
26
27 testscripts = sm-sign+verify sm-verify
28
29 EXTRA_DIST = runtest inittests $(testscripts) \
30              text-1.txt text-2.txt text-3.txt \
31              text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \
32              text-2.osig.pem text-2.osig-bad.pem \
33              samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key \
34              samplekeys/cert_g10code_pete1.pem \
35              samplekeys/cert_g10code_test1.pem \
36              samplekeys/cert_g10code_theo1.pem
37
38 TESTS = $(testscripts)
39
40 CLEANFILES = inittests.stamp x y y z out err 
41              *.lock .\#lk* 
42
43 DISTCLEANFILES = pubring.kbx~ random_seed
44
45 noinst_PROGRAMS = asschk
46
47 asschk_SOURCES = asschk.c
48
49
50 all-local: inittests.stamp
51
52 clean-local:
53         srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests --clean
54
55 inittests.stamp: inittests
56         LD_LIBRARY_PATH=$$(seen=0; \
57                            for i in $(LDFLAGS); \
58                            do \
59                              if echo "$$i" | egrep '^-L' >/dev/null 2>&1; \
60                              then \
61                                if test $$seen = 0; \
62                                then \
63                                  seen=1; \
64                                else \
65                                  echo -n ":"; \
66                                fi; \
67                                echo -n $${i} | sed 's/^-L//'; \
68                              fi; \
69                            done) \
70           srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests
71         echo timestamp >./inittests.stamp
72