3ca00cfc7dacb40268cf6c48c82c2374af0d3f90
[gpgme.git] / tests / gpg / Makefile.am
1 # Copyright (C) 2000 Werner Koch (dd9jn)
2 # Copyright (C) 2001, 2004, 2005, 2009 g10 Code GmbH
3
4 # This file is part of GPGME.
5
6 # GPGME is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of the
9 # License, or (at your option) any later version.
10
11 # GPGME is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
14 # Public License for more details.
15
16 # You should have received a copy of the GNU Lesser General Public
17 # License 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 GPG = @GPG@
23
24 TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO=
25
26 # The keylist tests must come after the import and the edit test.
27 noinst_HEADERS = t-support.h
28
29 if HAVE_W32_SYSTEM
30 tests_unix =
31 else
32 tests_unix = t-eventloop t-thread1
33 endif
34
35 TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers         \
36         t-decrypt t-verify t-decrypt-verify t-sig-notation t-export     \
37         t-import t-trustlist t-edit t-keylist t-keylist-sig t-wait      \
38         t-encrypt-large t-file-name t-gpgconf $(tests_unix)
39
40 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf
41 DISTCLEANFILES = pubring.gpg~ pubring.kbx~ random_seed gpg.conf gpg-agent.conf S.gpg-agent
42
43 EXTRA_DIST = mkdemodirs.in pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \
44         geheim.txt pubkey-1.asc seckey-1.asc pinentry
45
46 INCLUDES = -I$(top_builddir)/src
47
48 AM_CPPFLAGS = @GPG_ERROR_CFLAGS@
49 LDADD = ../../src/libgpgme.la
50 t_thread1_LDADD = ../../src/libgpgme-pthread.la
51
52 # We don't run t-genkey in the test suite, because it takes too long
53 noinst_PROGRAMS = $(TESTS) t-genkey
54
55 clean-local:
56         -rm -fR private-keys-v1.d
57
58 all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg 
59
60 export GNUPGHOME := $(abs_builddir)
61
62 ./pubring.gpg: $(srcdir)/pubdemo.asc
63         -$(GPG) --no-permission-warning \
64                 --import $(srcdir)/pubdemo.asc
65         -$(GPG) --no-permission-warning \
66                 --import $(srcdir)/secdemo.asc
67
68 ./gpg.conf:
69 # This is required for t-sig-notations.
70         echo no-force-v3-sigs > ./gpg.conf
71
72 ./gpg-agent.conf:
73 # This is required for gpg2, which does not support command fd.
74         echo pinentry-program $(abs_srcdir)/pinentry > ./gpg-agent.conf