From: Guus Sliepen Date: Sun, 8 Oct 2017 19:32:12 +0000 (+0200) Subject: Ensure "make distcheck" really runs without errors. X-Git-Tag: release-1.1pre16~62 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=a0baeddb8aa745007d0302ed06247cabb8facb32;p=tinc Ensure "make distcheck" really runs without errors. --- diff --git a/configure.ac b/configure.ac index 26c77c9b..39abe9d9 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT([tinc], m4_esyscmd_s((git describe || echo UNKNOWN) | sed 's/release-//')) AC_CONFIG_SRCDIR([src/tincd.c]) -AM_INIT_AUTOMAKE([std-options subdir-objects nostdinc silent-rules -Wall]) +AM_INIT_AUTOMAKE([std-options subdir-objects nostdinc silent-rules -Wall info-in-builddir]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_SILENT_RULES([yes]) diff --git a/doc/Makefile.am b/doc/Makefile.am index aa15b240..b3af5227 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -4,20 +4,9 @@ info_TEXINFOS = tinc.texi man_MANS = tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 -EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.8.in tinc.conf.5.in tinc-gui.8.in sample-config.tar.gz +EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.8.in tinc.conf.5.in tinc-gui.8.in sample-config -CLEANFILES = *.html tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 tincinclude.texi sample-config.tar.gz - -# Use `ginstall' in the definition of man_MANS to avoid -# confusion with the `install' target. The install rule transforms `ginstall' -# to install before applying any user-specified name transformations. -transform = s/ginstall/install/; @program_transform_name@ - -# For additional rules usually of interest only to the maintainer, -# see GNUmakefile and Makefile.maint. - -sample-config.tar.gz: sample-config - $(AM_V_GEN)GZIP=$(GZIP_ENV) $(AMTAR) chozf $@ --exclude .svn $< +CLEANFILES = *.html tincd.8 tinc.8 tinc.conf.5 tinc-gui.8 tincinclude.texi tincd.8.html: tincd.8 $(AM_V_GEN)w3mman2html $? > $@ diff --git a/gui/tinc-gui b/gui/tinc-gui index 65e8b144..4aae27b5 100755 --- a/gui/tinc-gui +++ b/gui/tinc-gui @@ -23,6 +23,7 @@ import socket import os import platform import time +import sys from argparse import ArgumentParser import wx @@ -628,7 +629,12 @@ if __name__ == '__main__': argparser.add_argument('-n', '--net', metavar='NETNAME', dest='netname', help='Connect to net NETNAME') argparser.add_argument('-p', '--pidfile', help='Path to the pid file (containing the controlcookie)') + argparser.add_argument('--version', action='store_true', help='Show version number') options = argparser.parse_args() + if options.version: + print('tinc-gui 1.1pre?') + sys.exit(0) + main(options.netname, options.pidfile) diff --git a/src/tincd.c b/src/tincd.c index ab4d9212..45240e26 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -370,9 +370,6 @@ int main(int argc, char **argv) { return 1; } - make_names(true); - chdir(confbase); - if(show_version) { printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE, BUILD_VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); @@ -390,6 +387,9 @@ int main(int argc, char **argv) { return 0; } + make_names(true); + chdir(confbase); + #ifdef HAVE_MINGW if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) { diff --git a/test/Makefile.am b/test/Makefile.am index 98f4a3bd..a56b5c4e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -20,6 +20,8 @@ check_PROGRAMS = pong pong_SOURCES = pong.c +AM_CFLAGS = -iquote. + clean-local: -for pid in *.test.?/pid; do ../src/tinc --pidfile="$$pid" stop; done -killall ../src/sptps_test diff --git a/test/algorithms.test b/test/algorithms.test index 2b79fc8a..c506a5d1 100755 --- a/test/algorithms.test +++ b/test/algorithms.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize two nodes diff --git a/test/basic.test b/test/basic.test index b181e754..c377202d 100755 --- a/test/basic.test +++ b/test/basic.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize and test one node diff --git a/test/commandline.test b/test/commandline.test index 157eb54c..44d651a5 100755 --- a/test/commandline.test +++ b/test/commandline.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize one node diff --git a/test/executables.test b/test/executables.test index 801de58c..0cf9723e 100755 --- a/test/executables.test +++ b/test/executables.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Just test whether the executables work $tincd --help diff --git a/test/import-export.test b/test/import-export.test index 6b5641c4..e7bca239 100755 --- a/test/import-export.test +++ b/test/import-export.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize three nodes diff --git a/test/invite-join.test b/test/invite-join.test index 28de83c6..4c254a46 100755 --- a/test/invite-join.test +++ b/test/invite-join.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize one node diff --git a/test/invite-offline.test b/test/invite-offline.test index b4354938..09034177 100755 --- a/test/invite-offline.test +++ b/test/invite-offline.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize one node diff --git a/test/invite-tinc-up.test b/test/invite-tinc-up.test index 8d637b94..26efddf2 100755 --- a/test/invite-tinc-up.test +++ b/test/invite-tinc-up.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize one node diff --git a/test/ns-ping.test b/test/ns-ping.test index 43e1b20c..49204367 100755 --- a/test/ns-ping.test +++ b/test/ns-ping.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Skip this test if we aren't root or if "ip netns" does not exist diff --git a/test/ping.test b/test/ping.test index 7e1a1365..961b16f4 100755 --- a/test/ping.test +++ b/test/ping.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Skip this test if we aren't root diff --git a/test/scripts.test b/test/scripts.test index 3b3f2749..2580ced7 100755 --- a/test/scripts.test +++ b/test/scripts.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize server node diff --git a/test/sptps-basic.test b/test/sptps-basic.test index 9f86c8cd..4c794379 100755 --- a/test/sptps-basic.test +++ b/test/sptps-basic.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Skip this test if we did not compile sptps_test diff --git a/test/variables.test b/test/variables.test index 5fe60465..f8656c93 100755 --- a/test/variables.test +++ b/test/variables.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize one node