[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - autogen.sh

Tor Lillqvist tml at kemper.freedesktop.org
Fri Apr 8 03:31:11 PDT 2011


 autogen.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f387462eb7b98379a94a29f6c6d27619d93fb55d
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Apr 8 13:28:48 2011 +0300

    Don't worry if there is no distro-configs/Foo.conf
    
    The --with-distro options might come from bin/build-ooo in a "build"
    style build, and in that case, the relevant configure options are
    already on the command line, too.

diff --git a/autogen.sh b/autogen.sh
index 376663c..0dede71 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -44,8 +44,8 @@ sub read_args($)
 sub invalid_distro($$)
 {
     my ($config, $distro) = @_;
-    print STDERR "can't find distro option set: $config\n";
-    print STDERR "valid values are:\n";
+    print STDERR "Can't find distro option set: $config\nThis is not necessarily a problem.\n";
+    print STDERR "Distros with distro option sets are:\n";
     my $dirh;
     opendir ($dirh, "distro-configs");
     while (($_ = readdir ($dirh))) {
@@ -53,7 +53,6 @@ sub invalid_distro($$)
 	print STDERR "\t$1\n";
     }
     closedir ($dirh);
-    exit (1);
 }
 
 my @cmdline_args = ();
@@ -72,8 +71,9 @@ for my $arg (@cmdline_args) {
 	my $config = "distro-configs/$1.conf";
 	if (! -f $config) {
 	    invalid_distro ($config, $1);
-	}
-	push @args, read_args ($config);
+        } else {
+            push @args, read_args ($config);
+        }
     } else {
 	push @args, $arg;
     }
commit 0a576bd2769a2e3ee4e069cd23a86c277d82d8c3
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Apr 8 13:14:52 2011 +0300

    Make the list of valid distros show up also in slightly older Perl versions
    
    See http://perldoc.perl.org/functions/readdir.html .

diff --git a/autogen.sh b/autogen.sh
index 642d523..376663c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -48,7 +48,7 @@ sub invalid_distro($$)
     print STDERR "valid values are:\n";
     my $dirh;
     opendir ($dirh, "distro-configs");
-    while (readdir ($dirh)) {
+    while (($_ = readdir ($dirh))) {
 	/(.*)\.conf$/ || next;
 	print STDERR "\t$1\n";
     }


More information about the Libreoffice-commits mailing list