]> granicus.if.org Git - curl/commitdiff
test1139: allow for the possibility that the man page is not rebuilt
authorDan Fandrich <dan@coneharvesters.com>
Sun, 26 Feb 2017 20:30:31 +0000 (21:30 +0100)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 26 Feb 2017 20:30:31 +0000 (21:30 +0100)
This is likely to be the case when building from a tar ball release
package which includes a prebuilt man page. In that case, test the
packaged man page instead. This only makes a difference when building
out-of-tree (in-tree, the location in both cases is identical).

tests/manpage-scan.pl

index 1cc47eb313858a8f2f01fd29e9bd0e9e7882948a..aa67f7f830b33d8f377eda512017be1f04e56695 100644 (file)
@@ -197,7 +197,8 @@ close(R);
 
 #########################################################################
 # parse the curl.1 man page, extract all documented command line options
-open(R, "<$buildroot/docs/curl.1") ||
+# The man page may or may not be rebuilt, so check both possible locations
+open(R, "<$buildroot/docs/curl.1") || open(R, "<$root/docs/curl.1") ||
     die "no input file";
 my @manpage; # store all parsed parameters
 while(<R>) {