summaryrefslogtreecommitdiff
path: root/help2man.PL
diff options
context:
space:
mode:
Diffstat (limited to 'help2man.PL')
-rwxr-xr-xhelp2man.PL15
1 files changed, 10 insertions, 5 deletions
diff --git a/help2man.PL b/help2man.PL
index 7a551a4..cfdec03 100755
--- a/help2man.PL
+++ b/help2man.PL
@@ -16,7 +16,7 @@ use Config;
use Getopt::Long;
my ($program, $version)
- = (qw$Id: help2man.PL,v 1.27 2002-03-19 12:52:37 bod Exp $)[1..2];
+ = (qw$Id: help2man.PL,v 1.28 2002-06-03 14:44:49 bod Exp $)[1..2];
$program =~ s/\.PL(,v)?$//;
@@ -59,7 +59,8 @@ eval 'exec $Config{perlpath} -wS \$0 \${1+"\$@"}'
print OUT <<'!NO!SUBS!';
# Generate a short man page from --help and --version output.
-# Copyright © 1997-2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -97,7 +98,7 @@ print OUT <<'!NO!SUBS!';
my $version_info = <<EOT;
GNU $this_program $this_version
-Copyright (C) 1997-2002 Free Software Foundation, Inc.
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -116,6 +117,7 @@ Usage: $this_program [OPTION]... EXECUTABLE
-i, --include=FILE include material from `FILE'
-I, --opt-include=FILE include material from `FILE' if it exists
-o, --output=FILE send output to `FILE'
+ -p, --info-page=TEXT name of Texinfo manual
-N, --no-info suppress pointer to Texinfo manual
--help print this help, then exit
--version print version number, then exit
@@ -134,7 +136,7 @@ my $manual = '';
my $source = '';
my $help_option = '--help';
my $version_option = '--version';
-my ($opt_name, @opt_include, $opt_output, $opt_no_info);
+my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info);
my %opt_def = (
'n|name=s' => \$opt_name,
@@ -144,6 +146,7 @@ my %opt_def = (
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
'o|output=s' => \$opt_output,
+ 'p|info-page=s' => \$opt_info,
'N|no-info' => \$opt_no_info,
'h|help-option=s' => \$help_option,
'v|version-option=s' => \$version_option,
@@ -552,6 +555,8 @@ while (length)
# Refer to the real documentation.
unless ($opt_no_info)
{
+ my $info_page = $opt_info || $program;
+
$sect = 'SEE ALSO';
$include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
@@ -564,7 +569,7 @@ and
.B $program
programs are properly installed at your site, the command
.IP
-.B info $program
+.B info $info_page
.PP
should give you access to the complete manual.
EOT