tests: Do not use check-local magic as dependency

* tests/gpg/Makefile.am: Use BUILT_SOURCES instead of check-local
and initial.test.
* lang/qt/tests/Makefile.am: Ditto.

--

This fixes "make dist" failure when source tree is clean:
  git clean -dxf
  autoreconf -ivf
  ./configure
  make dist

BUILT_SOURCES should be used when file as generated without explicit
dependency. The check-local is all-am dependency, this means that it
will be resolved also in "make dist".

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
This commit is contained in:
Alon Bar-Lev 2017-04-07 17:32:18 +03:00 committed by Justus Winter
parent 365c649ad0
commit ebefc6cbf9
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
2 changed files with 5 additions and 16 deletions

View File

@ -43,12 +43,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
-I$(top_srcdir)/lang/qt/src \ -I$(top_srcdir)/lang/qt/src \
-DTOP_SRCDIR="$(top_srcdir)" -DTOP_SRCDIR="$(top_srcdir)"
check-local: ./pubring-stamp
# To guarantee that check-local is run before any tests we
# add this dependency:
initial.test : check-local
support_src = t-support.h t-support.cpp support_src = t-support.h t-support.cpp
t_keylist_SOURCES = t-keylist.cpp $(support_src) t_keylist_SOURCES = t-keylist.cpp $(support_src)
@ -64,7 +58,7 @@ run_keyformailboxjob_SOURCES = run-keyformailboxjob.cpp
nodist_t_keylist_SOURCES = $(moc_files) nodist_t_keylist_SOURCES = $(moc_files)
BUILT_SOURCES = $(moc_files) BUILT_SOURCES = $(moc_files) pubring-stamp
noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \ noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
run-keyformailboxjob t-wkspublish t-verify t-various t-config run-keyformailboxjob t-wkspublish t-verify t-various t-config
@ -79,7 +73,7 @@ clean-local:
export GNUPGHOME := $(abs_builddir) export GNUPGHOME := $(abs_builddir)
./pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \ pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \
$(top_srcdir)/tests/gpg/secdemo.asc $(top_srcdir)/tests/gpg/secdemo.asc
echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf
echo "allow-loopback-pinentry" >> gpg-agent.conf echo "allow-loopback-pinentry" >> gpg-agent.conf
@ -90,7 +84,7 @@ export GNUPGHOME := $(abs_builddir)
$(GPG) --no-permission-warning \ $(GPG) --no-permission-warning \
--passphrase "abc" \ --passphrase "abc" \
--import $(top_srcdir)/tests/gpg/secdemo.asc --import $(top_srcdir)/tests/gpg/secdemo.asc
touch ./pubring-stamp touch pubring-stamp
.cpp.moc: .cpp.moc:
$(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@ $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@

View File

@ -60,6 +60,8 @@ EXTRA_DIST = initial.test final.test \
pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \
geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys) geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys)
BUILT_SOURCES = gpg.conf gpg-agent.conf pubring-stamp \
private-keys-v1.d/gpg-sample.stamp
AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@
AM_LDFLAGS = -no-install AM_LDFLAGS = -no-install
LDADD = ../../src/libgpgme.la LDADD = ../../src/libgpgme.la
@ -82,13 +84,6 @@ clean-local:
-$(top_srcdir)/tests/start-stop-agent --stop -$(top_srcdir)/tests/start-stop-agent --stop
-rm -fR private-keys-v1.d -rm -fR private-keys-v1.d
check-local: ./gpg.conf ./gpg-agent.conf ./pubring-stamp \
./private-keys-v1.d/gpg-sample.stamp
# To guarantee that check-local is run before any tests we
# add this dependency:
initial.test : check-local
export GNUPGHOME := $(abs_builddir) export GNUPGHOME := $(abs_builddir)
export GPG_AGENT_INFO := export GPG_AGENT_INFO :=