mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
cmdline-opts: Fixed build and test in out of source tree builds
This commit is contained in:
parent
88bdd7cf6f
commit
edb2d02855
@ -73,4 +73,4 @@ EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES)
|
|||||||
all: $(MANPAGE)
|
all: $(MANPAGE)
|
||||||
|
|
||||||
$(MANPAGE): $(DPAGES) $(OTHERPAGES)
|
$(MANPAGE): $(DPAGES) $(OTHERPAGES)
|
||||||
@PERL@ gen.pl mainpage > $(MANPAGE)
|
@PERL@ $(srcdir)/gen.pl mainpage $(srcdir) > $(MANPAGE)
|
||||||
|
@ -16,7 +16,7 @@ Unfortunately it seems some perls like msysgit can't handle a global input-only
|
|||||||
=end comment
|
=end comment
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
my $some_dir=".";
|
my $some_dir=$ARGV[1] || ".";
|
||||||
|
|
||||||
opendir(my $dh, $some_dir) || die "Can't opendir $some_dir: $!";
|
opendir(my $dh, $some_dir) || die "Can't opendir $some_dir: $!";
|
||||||
my @s = grep { /\.d$/ && -f "$some_dir/$_" } readdir($dh);
|
my @s = grep { /\.d$/ && -f "$some_dir/$_" } readdir($dh);
|
||||||
@ -101,7 +101,7 @@ sub added {
|
|||||||
|
|
||||||
sub single {
|
sub single {
|
||||||
my ($f, $standalone)=@_;
|
my ($f, $standalone)=@_;
|
||||||
open(F, "<:crlf", "$f") ||
|
open(F, "<:crlf", "$some_dir/$f") ||
|
||||||
return 1;
|
return 1;
|
||||||
my $short;
|
my $short;
|
||||||
my $long;
|
my $long;
|
||||||
@ -235,7 +235,7 @@ sub single {
|
|||||||
|
|
||||||
sub getshortlong {
|
sub getshortlong {
|
||||||
my ($f)=@_;
|
my ($f)=@_;
|
||||||
open(F, "<:crlf", "$f");
|
open(F, "<:crlf", "$some_dir/$f");
|
||||||
my $short;
|
my $short;
|
||||||
my $long;
|
my $long;
|
||||||
my $help;
|
my $help;
|
||||||
@ -281,7 +281,7 @@ sub indexoptions {
|
|||||||
|
|
||||||
sub header {
|
sub header {
|
||||||
my ($f)=@_;
|
my ($f)=@_;
|
||||||
open(F, "<:crlf", "$f");
|
open(F, "<:crlf", "$some_dir/$f");
|
||||||
my @d;
|
my @d;
|
||||||
while(<F>) {
|
while(<F>) {
|
||||||
push @d, $_;
|
push @d, $_;
|
||||||
@ -371,7 +371,7 @@ sub getargs {
|
|||||||
}
|
}
|
||||||
} while($f);
|
} while($f);
|
||||||
|
|
||||||
print "Usage: gen.pl <mainpage/listhelp/single FILE/protos>\n";
|
print "Usage: gen.pl <mainpage/listhelp/single FILE/protos> [srcdir]\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -93,7 +93,7 @@ EXTRA_DIST = mkhelp.pl makefile.dj Makefile.b32 \
|
|||||||
macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \
|
macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \
|
||||||
curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
|
curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
|
||||||
|
|
||||||
MANPAGE=$(top_srcdir)/docs/curl.1
|
MANPAGE=$(top_builddir)/docs/curl.1
|
||||||
README=$(top_srcdir)/docs/MANUAL
|
README=$(top_srcdir)/docs/MANUAL
|
||||||
MKHELP=$(top_srcdir)/src/mkhelp.pl
|
MKHELP=$(top_srcdir)/src/mkhelp.pl
|
||||||
HUGE=tool_hugehelp.c
|
HUGE=tool_hugehelp.c
|
||||||
|
@ -19,7 +19,7 @@ Verify that all libcurl options have man pages
|
|||||||
</name>
|
</name>
|
||||||
|
|
||||||
<command type="perl">
|
<command type="perl">
|
||||||
%SRCDIR/manpage-scan.pl %SRCDIR/..
|
%SRCDIR/manpage-scan.pl %SRCDIR/.. %PWD/..
|
||||||
</command>
|
</command>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
# we may get the dir root pointed out
|
# we may get the dir roots pointed out
|
||||||
my $root=$ARGV[0] || ".";
|
my $root=$ARGV[0] || ".";
|
||||||
|
my $buildroot=$ARGV[1] || ".";
|
||||||
my $syms = "$root/docs/libcurl/symbols-in-versions";
|
my $syms = "$root/docs/libcurl/symbols-in-versions";
|
||||||
my $curlh = "$root/include/curl/curl.h";
|
my $curlh = "$root/include/curl/curl.h";
|
||||||
my $errors=0;
|
my $errors=0;
|
||||||
@ -196,7 +197,7 @@ close(R);
|
|||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# parse the curl.1 man page, extract all documented command line options
|
# parse the curl.1 man page, extract all documented command line options
|
||||||
open(R, "<$root/docs/curl.1") ||
|
open(R, "<$buildroot/docs/curl.1") ||
|
||||||
die "no input file";
|
die "no input file";
|
||||||
my @manpage; # store all parsed parameters
|
my @manpage; # store all parsed parameters
|
||||||
while(<R>) {
|
while(<R>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user