]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Dh_Getopt.pm
r540: * Added a -L flag to dh_shlibdeps that is a nice alternative to providing a
[debhelper.git] / Debian / Debhelper / Dh_Getopt.pm
index 191227da2e2f4d9a752a515039d837993fbd687e..38aa342447c110d5cac695d620e946071ea4f703 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Debhelper option processing library.
 #
-# Joey Hess GPL copyright 1998.
+# Joey Hess GPL copyright 1998-2002
 
 package Debian::Debhelper::Dh_Getopt;
 use strict;
@@ -16,6 +16,14 @@ use Exporter;
 
 my (%options, %exclude_package);
 
+sub showhelp {
+       my $prog=basename($0);
+       print "Usage: $prog [options]\n\n";
+       print "  $prog is a part of debhelper. See debhelper(1)\n";
+       print "  and $prog(1) for complete usage instructions.\n"; 
+       exit(1);
+}
+
 # Passed an option name and an option value, adds packages to the list
 # of packages. We need this so the list will be built up in the right
 # order.
@@ -129,6 +137,16 @@ sub parseopts {
                "priority=i" => \$options{PRIORITY},
                
                "flavor=s" => \$options{FLAVOR},
+
+               "autodest" => \$options{AUTODEST},
+
+               "h|help" => \&showhelp,
+
+               "mainpackage=s" => \$options{MAINPACKAGE},
+
+               "list-missing" => \$options{LIST_MISSING},
+               
+               "L|libpackage=s" => \$options{LIBPACKAGE},
                
                "<>" => \&NonOption,
        );
@@ -165,13 +183,6 @@ sub parseopts {
        }
        @{$options{DOPACKAGES}}=@package_list;
 
-       # Generate EXCLUDE_FIND.
-       $options{EXCLUDE_FIND}='';
-       foreach (@{$options{EXCLUDE}}) {
-               $options{EXCLUDE_FIND}.="-regex .*".quotemeta($_).".* -or ";
-       }
-       $options{EXCLUDE_FIND}=~s/ -or $//;
-
        # If there are no packages to act on now, it's an error.
        if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
                error("I have no package to build");
@@ -191,7 +202,7 @@ sub parseopts {
        @ARGV=@{$options{ARGV}} if exists $options{ARGV};
 
        return %options;
-}      
+}
 
 sub import {
        # Enable bundling of short command line options.