]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make `check-docs` work from out-of-tree builds.
authorcypherpunks <cypherpunks@torproject.org>
Wed, 11 Mar 2015 09:47:13 +0000 (10:47 +0100)
committerNick Mathewson <nickm@torproject.org>
Sat, 14 Mar 2015 17:00:06 +0000 (13:00 -0400)
Makefile.am
configure.ac
scripts/maint/checkOptionDocs.pl.in [moved from scripts/maint/checkOptionDocs.pl with 88% similarity, mode: 0644]

index 56a1a01c449bd037409bd8793ca25d4eb185f1b0..4527dd124401f18297b0f6b745143bcbe35bce4f 100644 (file)
@@ -109,8 +109,8 @@ check-spaces:
                $(top_srcdir)/src/tools/*.[ch] \
                $(top_srcdir)/src/tools/tor-fw-helper/*.[ch]
 
-check-docs:
-       $(top_srcdir)/scripts/maint/checkOptionDocs.pl
+check-docs: all
+       $(PERL) $(top_builddir)/scripts/maint/checkOptionDocs.pl
 
 check-logs:
        $(top_srcdir)/scripts/maint/checkLogs.pl \
index 1109a4be502dfda6b9ad2f8d2c89e27e8a9e9600..3ba686802a7284e0d433cdd1858d17f7c7bb99d2 100644 (file)
@@ -215,6 +215,8 @@ AC_PROG_CPP
 AC_PROG_MAKE_SET
 AC_PROG_RANLIB
 
+AC_PATH_PROG([PERL], [perl])
+
 dnl autoconf 2.59 appears not to support AC_PROG_SED
 AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
 
@@ -1661,6 +1663,7 @@ AC_CONFIG_FILES([
         contrib/dist/tor.service
         src/config/torrc.sample
         src/config/torrc.minimal
+        scripts/maint/checkOptionDocs.pl
 ])
 
 if test x$asciidoc = xtrue && test "$ASCIIDOC" = "none" ; then
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from scripts/maint/checkOptionDocs.pl
rename to scripts/maint/checkOptionDocs.pl.in
index 94307c6..1f53adf
@@ -7,7 +7,7 @@ my %torrcSampleOptions = ();
 my %manPageOptions = ();
 
 # Load the canonical list as actually accepted by Tor.
-open(F, "./src/or/tor --list-torrc-options |") or die;
+open(F, "@abs_top_builddir@/src/or/tor --list-torrc-options |") or die;
 while (<F>) {
     next if m!\[notice\] Tor v0\.!;
     if (m!^([A-Za-z0-9_]+)!) {
@@ -34,12 +34,12 @@ sub loadTorrc {
     0;
 }
 
-loadTorrc("./src/config/torrc.sample.in", \%torrcSampleOptions);
+loadTorrc("@abs_top_srcdir@/src/config/torrc.sample.in", \%torrcSampleOptions);
 
 # Try to figure out what's in the man page.
 
 my $considerNextLine = 0;
-open(F, "./doc/tor.1.txt") or die;
+open(F, "@abs_top_srcdir@/doc/tor.1.txt") or die;
 while (<F>) {
     if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*!) {
         $manPageOptions{$2} = 1;
@@ -67,5 +67,3 @@ subtractHashes("Orphaned in torrc.sample.in", \%torrcSampleOptions, \%options);
 
 subtractHashes("Not in man page", \%options, \%manPageOptions);
 subtractHashes("Orphaned in man page", \%manPageOptions, \%options);
-
-