Quantcast

[PATCH GPGME] tests: Do not use check-local magic as dependency

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH GPGME] tests: Do not use check-local magic as dependency

Alon Bar-Lev-3
* 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 <[hidden email]>
---
 lang/qt/tests/Makefile.am | 12 +++---------
 tests/gpg/Makefile.am     |  9 ++-------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/lang/qt/tests/Makefile.am b/lang/qt/tests/Makefile.am
index 93dce07..fb45eec 100644
--- a/lang/qt/tests/Makefile.am
+++ b/lang/qt/tests/Makefile.am
@@ -43,12 +43,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
               -I$(top_srcdir)/lang/qt/src \
               -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
 
 t_keylist_SOURCES = t-keylist.cpp $(support_src)
@@ -64,7 +58,7 @@ run_keyformailboxjob_SOURCES = run-keyformailboxjob.cpp
 
 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 \
     run-keyformailboxjob t-wkspublish t-verify t-various t-config
@@ -79,7 +73,7 @@ clean-local:
 
 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
  echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf
  echo "allow-loopback-pinentry" >> gpg-agent.conf
@@ -90,7 +84,7 @@ export GNUPGHOME := $(abs_builddir)
  $(GPG) --no-permission-warning \
    --passphrase "abc" \
            --import $(top_srcdir)/tests/gpg/secdemo.asc
- touch ./pubring-stamp
+ touch pubring-stamp
 
 .cpp.moc:
  $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am
index 9b74ba6..1d9a6df 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -60,6 +60,8 @@ EXTRA_DIST = initial.test final.test \
         pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \
  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_LDFLAGS = -no-install
 LDADD = ../../src/libgpgme.la
@@ -82,13 +84,6 @@ clean-local:
  -$(top_srcdir)/tests/start-stop-agent --stop
  -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 GPG_AGENT_INFO :=
--
2.10.2


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH GPGME] tests: Do not use check-local magic as dependency

Werner Koch
On Fri,  7 Apr 2017 16:32, [hidden email] said:

>   autoreconf -ivf

FWIW: Please do not use autoreconf.  All software the GnuPG Project
maintains uses the script ./autogen.sh to create configure from sources
distributed in the repo.


Shalom-Salam,

   Werner

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (233 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH GPGME] tests: Do not use check-local magic as dependency

Alon Bar-Lev-3
On 7 April 2017 at 21:56, Werner Koch <[hidden email]> wrote:
> On Fri,  7 Apr 2017 16:32, [hidden email] said:
>
>>   autoreconf -ivf
>
> FWIW: Please do not use autoreconf.  All software the GnuPG Project
> maintains uses the script ./autogen.sh to create configure from sources
> distributed in the repo.

Thanks.
I am aware of it.
However, this issue was hidden and may be addressed if you are doing
this one way or the other. The generation of the stamps should be done
unless actually trying to build.

Regardless, in recent years (more than I can remember) the autoreconf
is doing a wonderful work, a complex autogen should not be required
any more. But this is not why I submitted this fix.

Regards,
Alon

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH GPGME] tests: Do not use check-local magic as dependency

Werner Koch
On Fri,  7 Apr 2017 21:25, [hidden email] said:

> I am aware of it.

I merely took the opportunity to state how we think about this.  I know
that Debian updates the autconf files too but that is up to them and in
fact it makes sense for a sistro to do tha.  This way they have
identical support on all packages.  We do it for the same reason: to
exclude bugs from using different autoconf tools and to minimize
differences between the configuraion of our developer's boxes.

> is doing a wonderful work, a complex autogen should not be required
> any more. But this is not why I submitted this fix.

autogen.sh is our central configuration script which does things which
can't be done in configure.ac.  For example there are helper function to
build a stable beta version number out of the git revision.  Doing that
with M4 macros turned out to be too fragile.

Salam-Shalom,

   Werner

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (233 bytes) Download Attachment
Loading...