Fixed rpm build if '%configure' specified in .spec file w/o any arguments.
[macros.git] / AutoGen.pm
index 1fad581..a7f223f 100644 (file)
@@ -159,7 +159,7 @@ my($class,%args)=@_;
        $spec=~s/\\\n/ /gs;
        $class->run(%Options,
                        "ARGV"=>["--copy"],
-                       "configure_args"=>[split /\s+/,($spec=~/^%configure\s+(.*)$/m)[0]],
+                       "configure_args"=>[split /\s+/,($spec=~/^[%]configure\b[ \t]*(.*)$/m)[0]],
                        );
        _remove "ChangeLog";    # force its rebuild by Makefile/rcs2log
        _system "make dist $name.spec";