From: Martin Mares Date: Sun, 25 May 2008 17:41:56 +0000 (+0200) Subject: Allow `configure OPTIONS' without specifying configuration name. X-Git-Tag: holmes-import~445 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a12875465effea5741d379a07f6f0f69dc92d756;p=libucw.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 bd1a7cc5..56a85e2f 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 ? "]" : "") . " [