]> Sergey Matveev's repositories - public-inbox.git/commitdiff
doc: ignore onion URLs for 80-column check
authorEric Wong <e@80x24.org>
Tue, 4 May 2021 04:15:44 +0000 (04:15 +0000)
committerEric Wong <e@80x24.org>
Tue, 4 May 2021 04:17:10 +0000 (04:17 +0000)
This failure was also passing under FreeBSD make + /bin/sh;
so we also avoid the '&&' chain is avoided and use '>$@' as a
separate line in the Makefile.

Documentation/include.mk
Makefile.PL

index 79bf460d22cfbf3f14bc4768e5eeb06d895a1ef3..5f3ffcc56937962f4cfd434d95e4bbb9417b909f 100644 (file)
@@ -52,8 +52,9 @@ install-man: man
 doc_install :: install-man
 
 check :: check-man
-check_man = $(AWK) '{gsub(/\b./,"")}length>80{print;err=1}END{exit(err)}'\
-       >&2 && >$@
+check_man = $(AWK) \
+       '{gsub(/\b./,"")}$$0 !~ /\.onion/&&length>80{print;e=1}END{exit(e)}' \
+       >&2
 
 check-man :: $(check_80)
 
index 85b18e7d9c0b01e29b3f27c4e3368be91445464b..401c033e22454a8cd98d072fe1aa8989b15717f4 100644 (file)
@@ -72,7 +72,8 @@ for my $i (@sections) {
                $t->{"Documentation/$m.html : $txt"} = [ "\$(txt2pre) <$txt" ];
                $t->{".$m.cols : $m.$i"} = [
                        "\@echo CHECK80 $m.$i;".
-                       "COLUMNS=80 \$(MAN) ./$m.$i | \$(check_man)" ];
+                       "COLUMNS=80 \$(MAN) ./$m.$i | \$(check_man)",
+                       '>$@' ];
                $t->{".$m.lexgrog: $m.$i"} = [
                        "\@echo LEXGROG $m.$i;" .
                        "\$(LEXGROG) ./$m.$i >\$\@+ && mv \$\@+ \$@" ];