[Libreoffice-commits] .: Branch 'feature/gbuildfixes' - 3 commits - solenv/bin solenv/gbuild
Bjoern Michaelsen
bmichaelsen at kemper.freedesktop.org
Fri Dec 2 10:16:05 PST 2011
solenv/bin/concat-deps.pl | 20 +++++++++++++++++++-
solenv/gbuild/platform/com_GCC_class.mk | 4 ++--
2 files changed, 21 insertions(+), 3 deletions(-)
New commits:
commit 71dac00344af6f55265782ab01475d14c8313624
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Dec 2 19:15:44 2011 +0100
use File::Spec instead of Cwd
diff --git a/solenv/bin/concat-deps.pl b/solenv/bin/concat-deps.pl
index 82910c7..935a50c 100755
--- a/solenv/bin/concat-deps.pl
+++ b/solenv/bin/concat-deps.pl
@@ -2,7 +2,7 @@
# reads a list of dependency files from a file, opens and
# concatenates them, while eliding duplicate nop rules.
-use Cwd 'fast_abs_path';
+use File::Spec;
sub read_depfiles($)
{
@@ -33,7 +33,7 @@ sub canonicalize_path($)
my $path = $2;
my $post =$3;
if (length($path) > 0 && index($path,$ENV{SRCDIR}) == 0) {
- $path = Cwd::fast_abs_path($2);
+ $path = File::Spec->rel2abs($2);
$path = "\$(SRCDIR)" . substr($path, length($ENV{SRCDIR}));
}
#print "## $pre$path$post";
commit db45ed39ac782341ed66daf9420bb6a0c2aea558
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Dec 2 18:46:25 2011 +0100
Revert "always compile from SRCDIR"
This reverts commit e4fbca1a513af15fd6c70929e3d5e53c06b93d89.
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 87d9364..61afbc1 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -27,7 +27,7 @@
define gb_CObject__command
$(call gb_Output_announce,$(2),$(true),C ,3)
$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \
+ mkdir -p $(dir $(1)) $(dir $(4)) && \
$(gb_CC) \
$(DEFS) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
@@ -46,7 +46,7 @@ endef
define gb_CxxObject__command
$(call gb_Output_announce,$(2),$(true),CXX,3)
$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \
+ mkdir -p $(dir $(1)) $(dir $(4)) && \
$(gb_CXX) \
$(DEFS) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
commit a4bcfb4f646180cdfdc00245b98b8fcde65640ac
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Dec 2 18:45:31 2011 +0100
use canonical paths in dep-files
diff --git a/solenv/bin/concat-deps.pl b/solenv/bin/concat-deps.pl
index c25df82..82910c7 100755
--- a/solenv/bin/concat-deps.pl
+++ b/solenv/bin/concat-deps.pl
@@ -2,6 +2,7 @@
# reads a list of dependency files from a file, opens and
# concatenates them, while eliding duplicate nop rules.
+use Cwd 'fast_abs_path';
sub read_depfiles($)
{
@@ -22,6 +23,22 @@ my @depfiles = read_depfiles (shift @ARGV);
my %rules;
print "# concatenated, reduced dependencies generated by solenv/bin/concat-deps.pl\n";
+print "# generated with \$(SRCDIR) = $ENV{SRCDIR}\n";
+
+sub canonicalize_path($)
+{
+ my $line = shift;
+ $line =~ /^(\s*)([^\s\n:]*)(.*\n?)$/;
+ my $pre = $1;
+ my $path = $2;
+ my $post =$3;
+ if (length($path) > 0 && index($path,$ENV{SRCDIR}) == 0) {
+ $path = Cwd::fast_abs_path($2);
+ $path = "\$(SRCDIR)" . substr($path, length($ENV{SRCDIR}));
+ }
+ #print "## $pre$path$post";
+ return "$pre$path$post";
+}
for my $fname (@depfiles) {
my $fileh;
@@ -31,7 +48,8 @@ for my $fname (@depfiles) {
my $last = '';
while (<$fileh>) {
- my $line = $_;
+ my $line = canonicalize_path($_);
+# print "# $line";
if ($line eq "\n") {
if ($last =~ /^(.*):\s*$/) {
if (defined $rules{$1}) {
More information about the Libreoffice-commits
mailing list