From: Martin Mares Date: Sun, 25 May 2008 17:40:59 +0000 (+0200) Subject: Allow `configure OPTIONS' without specifying configuration name. X-Git-Tag: python-dummy-working~172 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2d82d71708da826bffec3e1c5dd044f70f81cb46;p=moe.git Allow `configure OPTIONS' without specifying configuration name. This involves a little bit of dwimmery -- we assume that the options are all uppercase and the configuration files do not, but that's hopefully a fair game. --- diff --git a/lib/perl/Configure.pm b/lib/perl/Configure.pm index bd1a7cc..56a85e2 100644 --- a/lib/perl/Configure.pm +++ b/lib/perl/Configure.pm @@ -103,15 +103,19 @@ sub FindFile($) { sub Init($$) { my ($srcdir,$defconfig) = @_; - if ((!defined $defconfig && !@ARGV) || @ARGV && $ARGV[0] eq "--help") { - print STDERR "Usage: [/]configure " . (defined $defconfig ? "[" : "") . "" . (defined $defconfig ? "]" : "") . + sub usage($) { + my ($dc) = @_; + print STDERR "Usage: [/]configure " . (defined $dc ? "[" : "") . "" . (defined $dc ? "]" : "") . " [