#
# Debhelper option processing library.
#
-# Joey Hess GPL copyright 1998.
+# Joey Hess GPL copyright 1998-2002
package Debian::Debhelper::Dh_Getopt;
use strict;
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.
"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,
);
}
@{$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");
@ARGV=@{$options{ARGV}} if exists $options{ARGV};
return %options;
-}
+}
sub import {
# Enable bundling of short command line options.