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.librecmc.org/?a=commitdiff_plain;h=a0baeddb8aa745007d0302ed06247cabb8facb32;p=oweals%2Ftinc.git Ensure "make distcheck" really runs without errors. --- diff --git a/configure.ac b/configure.ac index 26c77c9..39abe9d 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 aa15b24..b3af522 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 65e8b14..4aae27b 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 ab4d921..45240e2 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 98f4a3b..a56b5c4 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 2b79fc8..c506a5d 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 b181e75..c377202 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 157eb54..44d651a 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 801de58..0cf9723 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 6b5641c..e7bca23 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 28de83c..4c254a4 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 b435493..0903417 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 8d637b9..26efddf 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 43e1b20..4920436 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 7e1a136..961b16f 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 3b3f274..2580ced 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 9f86c8c..4c79437 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 5fe6046..f8656c9 100755 --- a/test/variables.test +++ b/test/variables.test @@ -1,6 +1,6 @@ #!/bin/sh -. ./testlib.sh +. "${0%/*}/testlib.sh" # Initialize one node