1# Makefile.am - Makefile for GPGME Qt tests. 2# Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik 3# Software engineering by Intevation GmbH 4# 5# This file is part of GPGME. 6# 7# GPGME is free software; you can redistribute it and/or modify it 8# under the terms of the GNU Lesser General Public License as 9# published by the Free Software Foundation; either version 2.1 of the 10# License, or (at your option) any later version. 11# 12# GPGME is distributed in the hope that it will be useful, but WITHOUT 13# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 15# Public License for more details. 16# 17# You should have received a copy of the GNU Lesser General Public 18# License along with this program; if not, see <https://www.gnu.org/licenses/>. 19 20## Process this file with automake to produce Makefile.in 21 22GPG = gpg 23 24GNUPGHOME=$(abs_builddir) 25TESTS_ENVIRONMENT = GNUPGHOME=$(GNUPGHOME) 26 27EXTRA_DIST = initial.test 28 29TESTS = initial.test t-keylist t-keylocate t-ownertrust t-tofuinfo \ 30 t-encrypt t-verify t-various t-config t-remarks 31 32moc_files = t-keylist.moc t-keylocate.moc t-ownertrust.moc t-tofuinfo.moc \ 33 t-encrypt.moc t-support.hmoc t-wkspublish.moc t-verify.moc \ 34 t-various.moc t-config.moc t-remarks.moc 35 36AM_LDFLAGS = -no-install 37 38LDADD = ../../cpp/src/libgpgmepp.la ../src/libqgpgme.la \ 39 ../../../src/libgpgme.la @GPGME_QT_LIBS@ @GPG_ERROR_LIBS@ \ 40 @GPGME_QTTEST_LIBS@ @LDADD_FOR_TESTS_KLUDGE@ -lstdc++ 41 42AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \ 43 @GPG_ERROR_CFLAGS@ @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ \ 44 @LIBASSUAN_CFLAGS@ @GPGME_QTTEST_CFLAGS@ -DBUILDING_QGPGME \ 45 -I$(top_srcdir)/lang/qt/src \ 46 -DTOP_SRCDIR="$(top_srcdir)" 47 48support_src = t-support.h t-support.cpp 49 50t_keylist_SOURCES = t-keylist.cpp $(support_src) 51t_keylocate_SOURCES = t-keylocate.cpp $(support_src) 52t_ownertrust_SOURCES = t-ownertrust.cpp $(support_src) 53t_tofuinfo_SOURCES = t-tofuinfo.cpp $(support_src) 54t_encrypt_SOURCES = t-encrypt.cpp $(support_src) 55t_wkspublish_SOURCES = t-wkspublish.cpp $(support_src) 56t_verify_SOURCES = t-verify.cpp $(support_src) 57t_various_SOURCES = t-various.cpp $(support_src) 58t_config_SOURCES = t-config.cpp $(support_src) 59t_remarks_SOURCES = t-remarks.cpp $(support_src) 60run_keyformailboxjob_SOURCES = run-keyformailboxjob.cpp 61 62nodist_t_keylist_SOURCES = $(moc_files) 63 64BUILT_SOURCES = $(moc_files) pubring-stamp 65 66noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \ 67 run-keyformailboxjob t-wkspublish t-verify t-various t-config t-remarks 68 69CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ 70 gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ 71 random_seed S.gpg-agent .gpg-v21-migrated pubring-stamp $(moc_files) \ 72 gpg.conf tofu.db reader_0.status reader_1.status 73 74clean-local: 75 -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop 76 -rm -fR private-keys-v1.d crls.d 77 78pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \ 79 $(top_srcdir)/tests/gpg/secdemo.asc 80 -$(TESTS_ENVIRONMENT) gpgconf --kill all 81 echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf 82 echo "allow-loopback-pinentry" >> gpg-agent.conf 83 echo "ignore-invalid-option pinentry-mode" > gpg.conf 84 echo "pinentry-mode loopback" >> gpg.conf 85 $(TESTS_ENVIRONMENT) $(GPG) --no-permission-warning \ 86 --import $(top_srcdir)/tests/gpg/pubdemo.asc 87 $(TESTS_ENVIRONMENT) $(GPG) --no-permission-warning \ 88 --passphrase "abc" \ 89 --import $(top_srcdir)/tests/gpg/secdemo.asc 90 touch pubring-stamp 91 92.cpp.moc: 93 $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@ 94 95.h.hmoc: 96 $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@ 97