[Libreoffice-commits] .: Branch 'feature/gnumake2' - 8 commits - Makefile.in Module_ooo.mk RepositoryFixes.mk Repository.mk solenv/bin solenv/gbuild

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Mon Jan 10 17:01:13 PST 2011


 Makefile.in                            |   13 +++
 Module_ooo.mk                          |    1 
 Repository.mk                          |    2 
 RepositoryFixes.mk                     |    7 ++
 solenv/bin/build.pl                    |   78 ++++++++++++++---------
 solenv/bin/linkoo                      |  110 +++++++++++++++++++--------------
 solenv/bin/modules/RepositoryHelper.pm |    8 +-
 solenv/bin/modules/SourceConfig.pm     |   18 ++++-
 solenv/gbuild/Deliver.mk               |    2 
 solenv/gbuild/platform/linux.mk        |    3 
 10 files changed, 156 insertions(+), 86 deletions(-)

New commits:
commit 860c7a26c426cdd6abe249487029dfe534bdd90f
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Mon Jan 10 19:00:23 2011 -0600

    make linkoo scan the solver too, for Norbert's gnumake work

diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index c6929e6..7cf94ec 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -2,6 +2,8 @@
     eval 'exec perl -S $0 ${1+"$@"}'
         if 0;
 
+use strict;
+
 #*************************************************************************
 #
 #    This app makes it easy to link a live build
@@ -36,8 +38,8 @@
 #*************************************************************************
 
 # ends up in program/ooenv
-( $moz_lib = `pkg-config --variable=libdir mozilla-nss` ) =~ tr/\n/:/;
-$env_script = '
+( my $moz_lib = `pkg-config --variable=libdir mozilla-nss` ) =~ tr/\n/:/;
+my $env_script = '
 java_path=`../basis-link/ure-link/bin/javaldx 2>/dev/null`
 export LD_LIBRARY_PATH=".:$java_path:' . $moz_lib . '$LD_LIBRARY_PATH"
 ulimit -c unlimited
@@ -51,15 +53,25 @@ export OOO_DISABLE_RECOVERY=1
 export SAL_ALLOW_LINKOO_SYMLINKS=1
 ';
 
-$program_dir = 'basis-link/program';
-$brand_program_dir = 'program';
-$ure_misc_dir = 'basis-link/ure-link/share/misc';
+my $dry_run = 0;
+my $usage = 0;
+my $LANG;
+my $TARGET;
+my $LIBVER;
+my $OOO_BUILD;
+my $OOO_INSTALL;
+
+my $program_dir = 'basis-link/program';
+my $brand_program_dir = 'program';
+my $ure_misc_dir = 'basis-link/ure-link/share/misc';
+my $ure_java_dir = 'basis-link/ure-link/share/java';
+my $ure_lib_dir = 'basis-link/ure-link/lib';
 
 $program_dir = 'openoffice.org/basis-link/MacOS' if ($ENV{OS} eq 'MACOSX'); # FIXME probably wrong
 
 my @exceptions = ( 'cppuhelper', 'sunjavaplugin', 'libjvmfwk' );
 
-%replaceable = (
+my %replaceable = (
     $program_dir => '\.so',
     $program_dir . '/resource' => '\.res$',
     $program_dir . '/classes' => '\.jar$',
@@ -69,10 +81,11 @@ my @exceptions = ( 'cppuhelper', 'sunjavaplugin', 'libjvmfwk' );
 
 # strangely enough, OSX has those small differences...
 $replaceable{$program_dir} = '\.dylib$' if ($ENV{OS} eq 'MACOSX');
+$replaceable{$ure_lib_dir} = '\.dylib$' if ($ENV{OS} eq 'MACOSX');
 
- at search_dirs = ( 'lib', 'bin', 'class' );
+my @search_dirs = ( 'lib', 'bin', 'class' );
 
- at known_duplicates = ( 'db.jar', 'libi18n' );
+my @known_duplicates = ( 'db.jar', 'libi18n' );
 
 sub sniff_target($)
 {
@@ -179,6 +192,39 @@ sub do_link($$$$@)
     }
 }
 
+sub scan_one_dir($$$$)
+{
+    my ($installed_files, $build_files, $path, $solver) = @_;
+
+    for my $elem (@search_dirs) {
+	my $dirh_module;
+	my $module_path = "$path/$elem";
+	if (opendir ($dirh_module, $module_path)) {
+	    while (my $file = readdir ($dirh_module)) {
+		if (defined $installed_files->{$file}) {
+		    if (defined $build_files->{$file}) {
+			my $known = 0;
+			for my $regexp (@known_duplicates) {
+			    if ($file =~ m/$regexp/) {
+				$known = 1;
+			    }
+			}
+			if (!$known && !$solver) {
+			    print "Unknown duplicate file '$file' in: '" . 
+				$build_files->{$file} . "' vs '" .
+				$module_path . "' in module $path\n";
+			    exit (1);
+			}
+		    } else {
+			$build_files->{$file} = $module_path;
+		    }
+		}
+	    }
+	}
+	closedir ($dirh_module);
+    }
+}
+
 sub scan_and_link_files($$$)
 {
     my $build_path = shift;
@@ -196,38 +242,17 @@ sub scan_and_link_files($$$)
     }
     closedir ($dirh_toplevel);
 
-# FIXME: re-implement the $product functionality
-    my $module;
+    # Scan the old-style module/$target/lib directories ...
     my %build_files;
-    for $module (@modules) {
-	for $elem (@search_dirs) {
-	    my $dirh_module;
-	    my $module_path = "$module/$elem";
-	    if (opendir ($dirh_module, $module_path)) {
-			while (my $file = readdir($dirh_module)) {
-				if (defined $installed_files->{$file}) {
-					if (defined $build_files{$file}) {
-						my $known = 0;
-						for my $regexp (@known_duplicates) {
-							if ($file =~ m/$regexp/) {
-								$known = 1;
-							}
-						}
-						if (!$known) {
-							print "Unknown duplicate file '$file' in: '" . 
-							$build_files{$file} . "' vs '" .
-							$module_path . "' in module $module\n";
-							exit (1);
-						}
-					}
-					$build_files{$file} = $module_path;
-				}
-			}
-		}
-	    closedir ($dirh_module);
-	}
+    for my $module (@modules) {
+	scan_one_dir ($installed_files, \%build_files, $module, 0);
     }
 
+    # Now scan the solver
+    my $upd = 330;
+    $upd = $ENV{UPD} if (defined $ENV{UPD});
+    scan_one_dir ($installed_files, \%build_files, "$build_path/solver/$upd/$target", 1);
+
     for my $file (keys %build_files) {
 	my $src = $build_files{$file};
 	my $dest = $installed_files->{$file};
@@ -321,14 +346,10 @@ sub link_soffice_bin_files()
     print "\n";
 }
 
-my $a;
-my $usage = 0;
-for $a (@ARGV) {
+for my $a (@ARGV) {
 
 # options
-    if ($a =~ /--product/) {
-	$product = 1;
-    } elsif ($a =~ /--dry-run/) {
+    if ($a =~ /--dry-run/) {
         $dry_run = 1;
     } elsif (($a eq '--help') || ($a eq '-h')) {
 	$usage = 1;
@@ -349,7 +370,7 @@ if (!defined $OOO_BUILD && defined $ENV{SRC_ROOT}) {
 }
 
 if ($usage || !defined $OOO_INSTALL || !defined $OOO_BUILD) {
-    printf "Usage: linkoo </path/to/ooo/install> [</path/to/ooo/build/tree>] [--product] [--dry-run]\n";
+    printf "Usage: linkoo </path/to/ooo/install> [</path/to/ooo/build/tree>] [--dry-run]\n";
     exit (1);
 }
 
@@ -375,6 +396,7 @@ link_pagein_files();
 link_soffice_bin_files();
 
 if (!-f "$OOO_INSTALL/" . $brand_program_dir . "/ooenv") {
+    my $ooenv;
     print "Creating '$OOO_INSTALL/", $brand_program_dir, "/ooenv'\n";
     open ($ooenv, ">$OOO_INSTALL/" . $brand_program_dir . "/ooenv") || die "Can't open $OOO_INSTALL/" . $brand_program_dir . "/ooenv: $!";
     print $ooenv $env_script;
commit ef55d279600bc5d78ed349645741f4d3a46f5486
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 18:59:00 2011 -0600

    -Wunitialized is not compatible with -DDEBUG

diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index e0f2f67..a6a85c9 100755
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -87,7 +87,6 @@ gb_CXXFLAGS := \
 	-Wno-non-virtual-dtor \
 	-Wreturn-type \
 	-Wshadow \
-	-Wuninitialized \
 	-fmessage-length=0 \
 	-fno-strict-aliasing \
 	-fno-use-cxa-atexit \
@@ -100,6 +99,7 @@ ifneq ($(SYSBASE),)
 gb_CXXFLAGS += --sysroot=$(SYSBASE)
 gb_CFLAGS += --sysroot=$(SYSBASE)
 endif
+
 gb_LinkTarget_EXCEPTIONFLAGS := \
 	-DEXCEPTIONS_ON \
 	-fexceptions \
@@ -129,6 +129,7 @@ ifeq ($(gb_DEBUGLEVEL),2)
 gb_COMPILEROPTFLAGS := -O0
 else
 gb_COMPILEROPTFLAGS := -Os
+gb_CXXFLAGS += -Wuninitialized
 endif
 
 
commit d0821762282f3a0ed8802da2335853f06c41e73f
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 18:58:26 2011 -0600

    rename gb_HIRESTIME to gb_LOWRESTIME. Assume highres precision by default

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index f7322bb..6254073 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -39,7 +39,7 @@ endef
 
 define gb_Deliver_add_deliverable
 gb_Deliver_DELIVERABLES += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODIR)/%,%,$(1))
-$(if $(gb_HIRESTIME),,.LOW_RESOLUTION_TIME : $(1))
+$(if $(gb_LOWRESTIME),.LOW_RESOLUTION_TIME : $(1),)
 
 endef
 
commit a93666ba42a50c65c8cf0bd88dc7dc574d651a39
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 18:56:29 2011 -0600

    add missing library for sc.  Massage the delivered libraries name.

diff --git a/Repository.mk b/Repository.mk
index d77c234..8964872 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -59,6 +59,8 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 	sax \
 	sb \
 	sc \
+	scd \
+	scfilt \
 	scui \
 	sfx \
 	sot \
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 43c2fbc..2f6c897 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -38,6 +38,13 @@ gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salh
 gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
 
+gb_Library_FILENAMES := $(patsubst vbaswobj:vbaswobj%,vbaswobj:libvbaswobj%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst vbaobj:vbaobj%,vbaobj:libvbaobj%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst fsstorage:fsstoragelx%,fsstorage:fsstorage%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst hatchwindowfactory:hatchwindowfactorylx%,hatchwindowfactory:hatchwindowfactory%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst passwordcontainer:passwordcontainerlx%,passwordcontainer:passwordcontainer%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst productregistration:productregistrationlx%,productregistration:productregistration%,$(gb_Library_FILENAMES))
+
 ifeq ($(USE_SYSTEM_STL),YES)
 gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.so,$(gb_Library_FILENAMES))
 gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
commit f13571bfb3aee32852c102a23154786a400db333
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 01:05:38 2011 -0600

    support USE_GMAKE=1 envvar to build with gmake the modules that can be.

diff --git a/Makefile.in b/Makefile.in
index 9e05c70..5aac51a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,10 +3,16 @@
 
 SHELL=/bin/sh
 
+ifeq ($(USE_GMAKE),)
+GBUILD_OPT:=
+else
+GBUILD_OPT:=--gmake
+endif
+
 all: dmake/dmake at EXEEXT@ fetch
 	@. ./*[Ee]nv.[Ss]et.sh && \
         cd instsetoo_native && \
-        build.pl -P at BUILD_NCPUS@ --all -- -P at BUILD_MAX_JOBS@
+        build.pl $(GBUILD_OPT) -P at BUILD_NCPUS@ --all -- -P at BUILD_MAX_JOBS@
 
 install:
 	@. ./*[Ee]nv.[Ss]et.sh && \
@@ -29,7 +35,8 @@ distclean: dmake/dmake at EXEEXT@
 
 clean: dmake/dmake at EXEEXT@
 	@. ./*[Ee]nv.[Ss]et.sh && \
-        dmake clean
+        dmake clean && \
+        if [ -n "$$USE_GMAKE" ] ; then make -f GNUmakefile.mk -sr clean ; fi
 
 dmake/dmake at EXEEXT@:
 	@. ./*[Ee]nv.[Ss]et.sh && \
@@ -45,4 +52,4 @@ check:
 	@. ./*[Ee]nv.[Ss]et.sh && \
 	cd smoketestoo_native && \
 	export SAL_USE_VCLPLUGIN="svp" && \
-        build.pl -P at BUILD_NCPUS@ --all -- -P at BUILD_MAX_JOBS@
+        build.pl $(GBUILD_OPT) -P at BUILD_NCPUS@ --all -- -P at BUILD_MAX_JOBS@
commit ea6358508b2832004c7dbfc6c741d70b44336866
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 01:01:12 2011 -0600

    add sc in the list of gmake-Modules

diff --git a/Module_ooo.mk b/Module_ooo.mk
index aa2bae4..f24d973 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Module_Module,ooo))
 
 $(eval $(call gb_Module_add_moduledirs,ooo,\
 	framework \
+	sc \
 	sfx2 \
 	svl \
 	svtools \
commit a6bcc485282e886e3da32a4bfe09cce519587fe7
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 01:00:42 2011 -0600

    support for an alternate gbuild.lst to support gmake build
    
    This is to support the possibility of building some modules with gmake
    instead of dmake, while still maintaining the dmake method
    fully functional

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 64470c8..ba5dd17 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -4,7 +4,7 @@
 #*************************************************************************
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
+#
 # Copyright 2000, 2010 Oracle and/or its affiliates.
 #
 # OpenOffice.org - a multi-platform office productivity suite
@@ -151,9 +151,9 @@
     %platforms = (); # platforms available or being working with
     %platforms_to_copy = (); # copy output trees for the platforms when --prepare
     $tmp_dir = get_tmp_dir(); # temp directory for checkout and other actions
-    @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+    @possible_build_lists = ('gbuild.lst', 'build.lst', 'build.xlist'); # build lists names
     %build_list_paths = (); # build lists names
-    %build_lists_hash = (); # hash of arrays $build_lists_hash{$module} = \($path, $xml_list_object) 
+    %build_lists_hash = (); # hash of arrays $build_lists_hash{$module} = \($path, $xml_list_object)
     $pre_job = 'announce'; # job to add for not-single module build
     $post_job = '';        # -"-
     %windows_procs = ();
@@ -161,10 +161,10 @@
     @errors = (); # array of errors to be shown at the end of the process
     %html_info = (); # hash containing all necessary info for generating of html page
     %module_by_hash = (); # hash containing all modules names as values and correspondent hashes as keys
-    %build_in_progress = (); # hash of modules currently being built 
+    %build_in_progress = (); # hash of modules currently being built
     %build_is_finished = (); # hash of already built modules
     %modules_with_errors = (); # hash of modules with build errors
-    %build_in_progress_shown = ();  # hash of modules being built, 
+    %build_in_progress_shown = ();  # hash of modules being built,
                                     # and shown last time (to keep order)
     $build_time = time;
     %jobs_hash = ();
@@ -187,15 +187,15 @@
     $html_socket_obj = undef; # socket object for server
     my %clients_jobs = ();
     my %clients_times = ();
-    my $client_timeout = 0; # time for client to build (in sec)... 
+    my $client_timeout = 0; # time for client to build (in sec)...
                             # The longest time period after that
-                            # the server considered as an error/client crash 
+                            # the server considered as an error/client crash
     my %lost_client_jobs = (); # hash containing lost jobs
     my %job_jobdir = (); # hash containing job-dir pairs
     my $reschedule_queue = 0;
     my %module_build_queue = ();
     my %reversed_dependencies = ();
-    my %module_paths = (); # hash with absolute module paths  
+    my %module_paths = (); # hash with absolute module paths
     my %active_modules = ();
     my $generate_config = 0;
     my %add_to_config = ();
@@ -210,6 +210,8 @@
     my $zenity_in = '';
     my $zenity_out = '';
     my $zenity_err = '';
+    my $allow_gbuild = 0;
+    %is_gbuild = ();
 ### main ###
 
     get_options();
@@ -546,10 +548,17 @@ sub get_build_list_path {
         my $possible_dir_path = $module_paths{$_}.'/prj/';
         if (-d $possible_dir_path) {
             foreach my $build_list (@possible_build_lists) {
-                my $possible_build_list_path = CorrectPath($possible_dir_path . $build_list);
-                if (-f $possible_build_list_path) {
-                    $build_list_paths{$module} = $possible_build_list_path;
-                    return $possible_build_list_path;
+                # if gbuild are allow we favor gbuild.lst as the build instruction
+                if($build_list ne "gbuild.lst" || $allow_gbuild) {
+                    my $possible_build_list_path = CorrectPath($possible_dir_path . $build_list);
+                    if (-f $possible_build_list_path) {
+                        $build_list_paths{$module} = $possible_build_list_path;
+                        if ($build_list eq "gbuild.lst") {
+#                           print  "Using gmake for module $module\n";
+                            $is_gbuild{$module} = 1;
+                        };
+                        return $possible_build_list_path;
+                    };
                 };
             }
             print_error("There's no build list for $module");
@@ -609,7 +618,7 @@ sub store_weights {
 
 #
 # This procedure builds comlete dependency for each module, ie if the deps look like:
-# mod1 -> mod2 -> mod3 -> mod4,mod5, 
+# mod1 -> mod2 -> mod3 -> mod4,mod5,
 # than mod1 get mod3,mod4,mod5 as eplicit list of deps, not only mod2 as earlier
 #
 sub expand_dependencies {
@@ -638,7 +647,7 @@ sub reverse_dependencies {
             } else {
                 my %single_module_dep_hash = ($module => 1);
                 $$reversed{$_} = \%single_module_dep_hash;
-            }; 
+            };
         };
     };
 };
@@ -1457,6 +1466,7 @@ sub get_options {
         $arg =~ /^--checkmodules$/       and $checkparents = 1 and $ignore = 1 and next;
         $arg =~ /^-s$/        and $show = 1                         and next;
         $arg =~ /^--deliver$/    and $deliver = 1                     and next;
+        $arg =~ /^--gmake$/    and $allow_gbuild = 1 and print "ALLOW GBUILD" and next;
         $arg =~ /^(--job=)/       and $custom_job = $' and next;
         $arg =~ /^(--pre_job=)/       and $pre_custom_job = $' and next;
         $arg =~ /^(--post_job=)/       and $post_custom_job = $' and next; #'
@@ -1607,11 +1617,12 @@ sub get_module_and_buildlist_paths {
         $source_config_file = $source_config->get_config_file_path();
         $active_modules{$_}++ foreach ($source_config->get_active_modules());
         my %active_modules_copy = %active_modules;
-        foreach ($source_config->get_all_modules()) {
-            delete $active_modules_copy{$_} if defined($active_modules_copy{$_});
-            next if ($_ eq $initial_module);
-            $module_paths{$_} = $source_config->get_module_path($_);
-            $build_list_paths{$_} = $source_config->get_module_build_list($_)
+        foreach my $module ($source_config->get_all_modules()) {
+            delete $active_modules_copy{$module} if defined($active_modules_copy{$module});
+            next if ($module eq $initial_module);
+            $module_paths{$module} = $source_config->get_module_path($module);
+            $build_list_paths{$module} = $source_config->get_module_build_list($module);
+            $is_gbuild{$module} = $source_config->{GBUILD};
         }
         $dead_parents{$_}++ foreach (keys %active_modules_copy);
     };
@@ -3328,7 +3339,7 @@ sub accept_connection {
 sub check_client_jobs {
     foreach (keys %clients_times) {
         if (time - $clients_times{$_} > $client_timeout) {
-            print "Client's $_ Job: \"$clients_jobs{$_}\" apparently got lost...\n"; 
+            print "Client's $_ Job: \"$clients_jobs{$_}\" apparently got lost...\n";
             print "Scheduling for rebuild...\n";
             print "You might need to check the $_\n";
             $lost_client_jobs{$clients_jobs{$_}}++;
@@ -3491,7 +3502,14 @@ sub get_job_string {
     my $full_job_dir = $job_dir;
     if ($job_dir =~ /(\s)/o) {
         $job = $'; #'
-        $job = $deliver_command if ($job eq $post_job);
+        print $echo . "determine if we need to deliver $job_dir\n";
+        if ($job eq $post_job) {
+            if( $is_gbuild{$job_dir} ) {
+                print "Skip deliver for gmake-built module $job_dir\n";
+                return'';
+            };
+            $job = $deliver_command
+        };
         $full_job_dir = $module_paths{$`};
     }
     my $log_dir = File::Basename::dirname($log_file);
diff --git a/solenv/bin/modules/RepositoryHelper.pm b/solenv/bin/modules/RepositoryHelper.pm
index ac0ba59..912a158 100644
--- a/solenv/bin/modules/RepositoryHelper.pm
+++ b/solenv/bin/modules/RepositoryHelper.pm
@@ -87,10 +87,10 @@ sub get_initial_directory
     return $self->{INITIAL_DIRECTORY};
 }
 
-sub get_scm_name 
+sub get_scm_name
 {
     my $self        = shift;
-    return$self->{SCM_NAME}; 
+    return$self->{SCM_NAME};
 }
 
 ##### private methods #####
@@ -118,7 +118,7 @@ sub search_for_hg {
 
 sub search_via_build_lst {
     my $self = shift;
-    my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+    my @possible_build_lists = ('gbuild.lst', 'build.lst', 'build.xlist'); # build lists names
     my $previous_dir = '';
     my $rep_root_candidate = $self->{INITIAL_DIRECTORY};
     do {
@@ -167,7 +167,7 @@ RepositoryHelper - Perl module for working with repositories and underlying SCM
     # Get repositories for the actual workspace:
     $a->get_repository_root();
 
-  
+
 =head1 DESCRIPTION
 
 RepositoryHelper is a perlPerl module for working with repositories and underlying SCM 
diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm
index 5b147a5..a660d07 100755
--- a/solenv/bin/modules/SourceConfig.pm
+++ b/solenv/bin/modules/SourceConfig.pm
@@ -78,6 +78,14 @@ sub new {
     } else {
         $source_root = $ENV{SOURCE_ROOT_DIR};
     };
+    if ( defined $ENV{USE_GBUILD} and "$ENV{USE_GBUILD}" ne "" )
+    {
+        $self->{POSSIBLE_BUILD_LIST} = ('gbuild.lst', 'build.lst', 'build.xlist'); # build lists names
+    }
+    else
+    {
+        $self->{POSSIBLE_BUILD_LIST} = ('build.lst', 'build.xlist'); # build lists names
+    }
     $source_root = Cwd::realpath($source_root);
     $self->{SOURCE_ROOT} = $source_root;
     $self->{DEBUG} = 0;
@@ -94,6 +102,7 @@ sub new {
     $self->{REMOVE_REPOSITORIES} = {};
     $self->{NEW_REPOSITORIES} = [];
     $self->{WARNINGS} = [];
+    $self->{GBUILD} = 0;
     $self->{REPORT_MESSAGES} = [];
     $self->{CONFIG_FILE_CONTENT} = [];
     if (defined $self->{USER_SOURCE_ROOT}) {
@@ -173,11 +182,14 @@ sub get_module_build_list {
     if (defined ${$self->{MODULE_BUILD_LIST_PATHS}}{$module}) {
         return ${$self->{MODULE_BUILD_LIST_PATHS}}{$module};
     } else {
-        my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
-        foreach (@possible_build_lists) {
-            my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_";
+        my @possible_build_lists = $self->{POSSIBLE_BUILD_LIST}; # build lists names
+        foreach my $build_list (@possible_build_lists) {
+            my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$build_list";
             if (-e $possible_path) {
                 ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path;
+                if ( $build_list eq "gbuild.lst" ) {
+                    $self->{GBUILD} = 1;
+                };
                 return $possible_path;
             };
         };
commit f672172bb49d0cc0a3ba16d4f88b97755889d8ca
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 10 00:52:15 2011 -0600

    add a few comment to balance quotes, to make the editor less confused

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 33e7916..64470c8 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -869,7 +869,7 @@ sub get_prj_platform {
         s/\r\n//;
         $line++;
         if ($_ =~ /\snmake\s/) {
-            if ($' =~ /\s*-\s+(\w+)[,\S+]*\s+(\S+)/ ) {
+            if ($' =~ /\s*-\s+(\w+)[,\S+]*\s+(\S+)/ ) { #'
                 my $platform = $1;
                 my $alias = $2;
                 print_error ("There is no correct alias set in the line $line!") if ($alias eq 'NULL');
@@ -961,7 +961,7 @@ sub get_deps_hash {
                 $Platform = $1;
                 $Dependencies = $';
                 while ($Dependencies =~ /,(\w+)/o) {
-                    $Dependencies = $';
+                    $Dependencies = $'; #'
                 };
                 $Dependencies =~ /\s+(\S+)\s+/o;
                 $DirAlias = $1;
@@ -973,7 +973,7 @@ sub get_deps_hash {
                 delete $DeadDependencies{$DirAlias} if (defined $DeadDependencies{$DirAlias});
                 print_error("Directory alias $DirAlias is defined at least twice!! Please, correct build.lst in module $module_to_build") if (defined $$dependencies_hash{$DirAlias});
                 $PlatformHash{$DirAlias}++;
-                $Dependencies = $';
+                $Dependencies = $'; #'
                 print_error("$module_to_build/prj/build.lst has wrongly written dependencies string:\n$_\n") if (!$Dependencies);
                 $deps_hash{$_}++ foreach (GetDependenciesArray($Dependencies));
                 $$dependencies_hash{$DirAlias} = \%deps_hash;
@@ -1337,7 +1337,7 @@ sub GetDependenciesArray {
         print_error("Project $prj has wrongly written dependencies string:\n $string") if (!$DepString);
         $DepString =~ /(\S+)\s*/o;
         $ParentPrj = $1;
-        $DepString = $';
+        $DepString = $'; #'
         if ($ParentPrj =~ /\.(\w+)$/o) {
             $ParentPrj = $`;
             if (($prj_platform{$ParentPrj} ne $1) &&
@@ -1459,7 +1459,7 @@ sub get_options {
         $arg =~ /^--deliver$/    and $deliver = 1                     and next;
         $arg =~ /^(--job=)/       and $custom_job = $' and next;
         $arg =~ /^(--pre_job=)/       and $pre_custom_job = $' and next;
-        $arg =~ /^(--post_job=)/       and $post_custom_job = $' and next;
+        $arg =~ /^(--post_job=)/       and $post_custom_job = $' and next; #'
         $arg =~ /^-d$/    and $deliver = 1                     and next;
         $arg =~ /^--dlv_switch$/    and $dlv_switch = shift @ARGV    and next;
         $arg =~ /^--file$/        and $cmd_file = shift @ARGV             and next;
@@ -2025,7 +2025,7 @@ sub do_custom_job {
     my ($module_job, $dependencies_hash) = @_;
     $module_job =~ /(\s)/o;
     my $module = $`;
-    my $job = $';
+    my $job = $'; #'
     html_store_job_info($dependencies_hash, $module_job);
     my $error_code = 0;
     if ($job eq $pre_job) {
@@ -2477,7 +2477,7 @@ sub get_modules_passed {
             if ($option =~ /(:)/) {
                 $option = $`;
                 print_error("\'--from\' switch collision") if ($build_all_cont);
-                $build_all_cont = $';
+                $build_all_cont = $'; #'
             };
             $$hash_ref{$option}++;
         };
@@ -3383,7 +3383,7 @@ sub run_server {
         my %client_hash = ();
         foreach (@client_data) {
             /(=)/;
-            $client_hash{$`} = $';
+            $client_hash{$`} = $'; #'
         }
         my $pid = $client_hash{pid} . '@' . $client_host;
         if (defined $client_hash{platform}) {
@@ -3490,7 +3490,7 @@ sub get_job_string {
     my $log_file = $jobs_hash{$job_dir}->{LONG_LOG_PATH};
     my $full_job_dir = $job_dir;
     if ($job_dir =~ /(\s)/o) {
-        $job = $';
+        $job = $'; #'
         $job = $deliver_command if ($job eq $post_job);
         $full_job_dir = $module_paths{$`};
     }


More information about the Libreoffice-commits mailing list