From: Joey Hess <joey@gnu.kitenet.net>
Date: Sun, 28 Jun 2009 19:41:40 +0000 (-0400)
Subject: Revert "Add --help-buildsystem option to dh_auto."
X-Git-Tag: 7.3.0~27
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a74b1dde6af2b1b3a3d39eefb9869f05b79d8b26;p=debhelper.git

Revert "Add --help-buildsystem option to dh_auto."

I'm unsure why we need this complication. Perl modules are allowed to
install man pages documenting the module, if it really needs documentation.

This reverts commit 49b64c7852744f54250121b1c60544e1f5de70b6.
---

diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm
index 15deabe..d37c593 100644
--- a/Debian/Debhelper/Dh_Buildsystems.pm
+++ b/Debian/Debhelper/Dh_Buildsystems.pm
@@ -29,7 +29,6 @@ my $opt_buildsys;
 my $opt_sourcedir;
 my $opt_builddir;
 my $opt_list;
-my $opt_help_buildsys;
 
 sub create_buildsystem_instance {
 	my $system=shift;
@@ -122,8 +121,6 @@ sub buildsystems_init {
 
 	    "l" => \$opt_list,
 	    "list" => \$opt_list,
-
-	    "help-buildsystem" => \$opt_help_buildsys,
 	);
 	$args{options}{$_} = $options{$_} foreach keys(%options);
 	Debian::Debhelper::Dh_Lib::init(%args);
@@ -154,50 +151,6 @@ sub buildsystems_list {
 		if ! defined $auto && ! defined $specified;
 }
 
-sub help_buildsystem {
-	my $step=shift;
-
-	# Print build system help page to standard output
-
-	my $inst = load_buildsystem($opt_buildsys, $step);
-	if ($inst) {
-		my $pmfile = ref $inst;
-		$pmfile =~ s#::#/#g;
-		$pmfile = $INC{"$pmfile.pm"};
-
-		# Display help with perldoc if it is installed and output is
-		# a tty
-		my $perldoc;
-		if (-t STDOUT) {
-			eval "use Pod::Perldoc";
-			$perldoc = "Pod::Perldoc" if (!$@);
-		}
-		if ($perldoc) {
-			$perldoc = new Pod::Perldoc();
-			$perldoc->{args} = [ '-oman',
-			                     '-w', 'section=7" "--name=dh_auto_'.lc($inst->NAME()),
-			                     '-w', 'center=Dh_auto build system documentation',
-			                     '-w', 'release=',
-			                     '-F', $pmfile ];
-			$perldoc->process();
-		}
-		else {
-			# No perldoc on the system. Use Pod::Usage to emit simple text
-			eval "use Pod::Usage";
-			pod2usage( -message => "Help page for the ".$inst->NAME()." build system\n" .
-			                       '<' . '-'x74 . '>',
-			           -input => $pmfile, -exitval => 'NOEXIT',
-			           -verbose => 2, -noperldoc => 1 );
-			print '<', '-'x74, '>', "\n";
-		}
-		return 0;
-	}
-	else {
-		print STDERR "No system auto-selected or specified. Try using --buildsystem option\n";
-		return 1;
-	}
-}
-
 sub buildsystems_do {
 	my $step=shift;
 
@@ -215,10 +168,6 @@ sub buildsystems_do {
 		exit 0;
 	}
 
-	if ($opt_help_buildsys) {
-		exit help_buildsystem($step);
-	}
-
 	my $buildsystem = load_buildsystem($opt_buildsys, $step);
 	if (defined $buildsystem) {
 		$buildsystem->pre_building_step($step);
diff --git a/debhelper.pod b/debhelper.pod
index 40147a5..cea5283 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -216,11 +216,6 @@ includes both default and third party build systems (marked as such). Also
 shows which build system would be automatically selected, or which one
 is manually specified with the I<--buildsystem> option.
 
-=item B<--help-buildsystem>
-
-Print detailed help about a build system which would be auto-selected or which
-is manually specified with the L<--buildsystem> option.
-
 =back
 
 =head1 NOTES