Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
da6c3d4b
Kaydet (Commit)
da6c3d4b
authored
Haz 20, 2012
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
re-work to test the effect of boost elision.
Change-Id: Idef032c08c097e04fcf0cae3d184ceb660b65949
üst
0f12c5de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
27 deletions
+41
-27
concat-deps.pl
solenv/bin/concat-deps.pl
+41
-27
No files found.
solenv/bin/concat-deps.pl
Dosyayı görüntüle @
da6c3d4b
...
...
@@ -24,21 +24,9 @@ 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"
;
print
"# generated with \$(OUTDIR) = $ENV{OUTDIR}\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
=
File::
Spec
->
rel2abs
(
$2
);
$path
=
"\$(SRCDIR)"
.
substr
(
$path
,
length
(
$ENV
{
SRCDIR
}));
}
#print "## $pre$path$post";
return
"$pre$path$post"
;
}
my
$boost_path
=
$ENV
{
OUTDIR
}
.
'/inc/boost/'
;
for
my
$fname
(
@depfiles
)
{
my
$fileh
;
...
...
@@ -47,20 +35,46 @@ for my $fname (@depfiles) {
open
(
$fileh
,
$fname
)
||
die
"Can't open $fname: $!\n"
;
my
$last
=
''
;
my
$rule_count
=
0
;
my
$with_boost_count
=
0
;
while
(
<
$fileh
>
)
{
my
$line
=
canonicalize_path
(
$_
);
# print "# $line";
if
(
$line
eq
"\n"
)
{
if
(
$last
=~
/^(.*):\s*$/
)
{
if
(
defined
$rules
{
$1
})
{
$last
=
''
;
next
;
}
$rules
{
$1
}
=
1
;
}
}
print
$last
;
$last
=
$line
;
# canonicalise path
m/^(\s*)([^\s\n:]*)(.*\n?)$/
;
my
$pre
=
$1
;
my
$path
=
$2
;
my
$post
=
$3
;
$rule_count
++
if
(
$post
=~
m/:/
);
if
(
length
(
$path
)
>
0
&&
index
(
$path
,
$ENV
{
SRCDIR
})
==
0
)
{
$path
=
File::
Spec
->
rel2abs
(
$2
);
if
(
index
(
$path
,
$ENV
{
OUTDIR
})
==
0
)
{
my
$solverpath
=
substr
(
$path
,
length
(
$ENV
{
OUTDIR
}));
if
(
$solverpath
=~
m|/inc/boost/|
)
{
if
(
$with_boost_count
!=
$rule_count
||
!
(
$post
=~
m/\\/
))
{
$path
=
'$(OUTDIR)/inc/boost/deliver.log'
;
$with_boost_count
=
$rule_count
;
}
else
{
# elide it
$path
=
''
;
$pre
=
''
;
$post
=
''
;
}
}
else
{
$path
=
"\$(OUTDIR)"
.
$solverpath
;
}
}
else
{
$path
=
"\$(SRCDIR)"
.
substr
(
$path
,
length
(
$ENV
{
SRCDIR
}));
}
}
$line
=
"$pre$path$post"
;
if
(
$line
eq
"\n"
)
{
if
(
$last
=~
/^(.*):\s*$/
)
{
if
(
defined
$rules
{
$1
})
{
$last
=
''
;
next
;
}
$rules
{
$1
}
=
1
;
}
}
print
$last
;
$last
=
$line
;
}
print
"$last\n"
;
# in case of missing newline
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment