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
eb976220
Kaydet (Commit)
eb976220
authored
Ara 18, 2012
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
update update_pch.sh
Change-Id: I8353ab9808e5a496ec1b484ef7c80949534ab640
üst
a2279bb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
13 deletions
+44
-13
update_pch.sh
solenv/bin/update_pch.sh
+44
-13
No files found.
solenv/bin/update_pch.sh
Dosyayı görüntüle @
eb976220
...
...
@@ -10,7 +10,7 @@
root
=
`
dirname
$0
`
root
=
`
cd
$root
/../..
&&
pwd
`
if
test
-z
$1
;
then
if
test
-z
"
$1
"
;
then
headers
=
`
ls
$root
/
*
/inc/pch/precompiled_
*
.hxx
`
else
headers
=
"
$1
"
...
...
@@ -21,24 +21,32 @@ header=$x
echo
updating
`
echo
$header
|
sed
-e
s%
$root
/%%
`
module
=
`
echo
$header
|
sed
-e
s%
$root
/%%
-e
s%/.
*
%%
`
name
=
`
echo
$header
|
sed
-e
s/.
*
precompiled_//
-e
s/
\.
hxx//
`
makefile
=
"
$root
/
$module
/
Library_
$name
.mk"
makefile
=
"Library_
$name
.mk"
tmpfile
=
`
mktemp
`
cat
"
$makefile
"
|
sed
's#\\$##'
|
\
cat
"
$
root
/
$module
/
$
makefile
"
|
sed
's#\\$##'
|
\
(
inobjects
=
ifstack
=
0
while
read
line
;
do
if
(
test
"
$line
"
=
"))"
)
||
(
echo
$line
|
grep
-q
", "
)
;
then
inobjects
=
elif
echo
$line
|
grep
-q
-e
add_exception_objects
-e
add_noexception_objects
-e
add_cxxobject
-e
add_cxxobjects
;
then
inobjects
=
1
elif
test
-n
"
$inobjects
"
;
then
if
test
$ifstack
-ne
0
;
then
echo
Sources
in
a conditional, ignoring
for
now.
>
&2
fi
elif
echo
$line
|
grep
-q
^if
;
then
ifstack
=
$((
ifstack
+
1
))
elif
echo
$line
|
grep
-q
^endif
;
then
ifstack
=
$((
ifstack
-
1
))
elif
test
-n
"
$inobjects
"
-a
$ifstack
-eq
0
;
then
file
=
$line
if
!
test
-f
"
$root
/
$file
"
.cxx
;
then
echo
No file
$file
in
makefile
`
echo
$makefile
|
sed
-e
s%
$root
/%%
`
>
&2
echo
No file
$file
in
$module
/
$makefile
>
&2
else
cat
"
$root
/
$file
"
.cxx |
grep
-e
'^\s*#include'
|
sed
's/\(#include [<"][^
<
"]*[>"]\).*/\1/'
|
sed
's#\.\./##g#'
>>
$tmpfile
cat
"
$root
/
$file
"
.cxx |
grep
-e
'^\s*#include'
|
sed
's/\(#include [<"][^
>
"]*[>"]\).*/\1/'
|
sed
's#\.\./##g#'
>>
$tmpfile
fi
fi
done
...
...
@@ -56,24 +64,47 @@ cat >$header <<EOF
EOF
localdir
=
"
`
dirname
$makefile
`
"
# Library_svx needs this (sendreportw32.cxx)
if
test
"
$makefile
"
=
Library_svx.mk
;
then
cat
>>
$header
<<
EOF
#ifdef WNT
#define UNICODE
#define _UNICODE
#endif
EOF
fi
function
local_file
()
(
file
=
"
$1
"
find
"
$localdir
"
-type
f |
grep
/
"
$file
"
'$'
-q
echo
"
$file
"
|
grep
-q
^
"
$module
"
/
&&
exit
0
# find "$root/$module" -type f | grep -v "$root/$module/inc/" | grep /"$file"'$' && exit 0
find
"
$root
/
$module
"
-type
f |
grep
/
"
$file
"
'$'
-q
&&
exit
0
if
echo
"
$file
"
|
grep
-F
.
-q
;
then
find
"
$root
/
$module
"
-type
f |
grep
-q
/
`
echo
"
$file
"
|
sed
's/\.hxx$/.sdi/'
`
&&
exit
0
fi
# not local
exit
1
)
function
skip
_ignore
()
function
filter
_ignore
()
(
grep
-v
-F
-e
'#include "gperffasttoken.hxx"'
# - filter out all files that are not normal headers
# - gperffasttoken.hxx is not a problem header
# - sores.hxx provides BMP_PLUGIN, which is redefined
# - some sources play ugly #define tricks with editeng/eeitemid.hxx
grep
-e
'\.h[">]$'
-e
'\.hpp[">]$'
-e
'\.hdl[">]$'
-e
'\.hxx[">]$'
-e
'^[^\.]*>$'
|
\
grep
-v
-F
-e
'#include "gperffasttoken.hxx"'
|
\
grep
-v
-F
-e
'#include <svtools/sores.hxx>'
|
\
grep
-v
-F
-e
'#include <editeng/eeitemid.hxx>'
)
# " in #include "foo" breaks echo down below, so " -> @
cat
$tmpfile
|
sort
-u
|
skip
_ignore |
sed
's/"/@/g'
|
\
cat
$tmpfile
|
sort
-u
|
filter
_ignore |
sed
's/"/@/g'
|
\
(
while
read
line
;
do
file
=
`
echo
$line
|
sed
's/.*[<"@]\(
.
*\)[>"@].*/\1/'
`
file
=
`
echo
$line
|
sed
's/.*[<"@]\(
[^>"@]
*\)[>"@].*/\1/'
`
if
!
local_file
"
$file
"
;
then
echo
$line
|
sed
's/@/"/g'
>>
$header
fi
...
...
@@ -85,8 +116,8 @@ cat >>$header <<EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
EOF
rm
$tmpfile
done
#echo Done.
exit
0
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