[Libreoffice-commits] .: 2 commits - solenv/bin svx/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 18 07:56:55 PST 2012
solenv/bin/update_pch.sh | 108 ++++++++++++++++++++--------------------
svx/inc/pch/precompiled_svx.hxx | 7 --
2 files changed, 55 insertions(+), 60 deletions(-)
New commits:
commit 626969aa7cce72692767e265a2a98ef111202487
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Dec 18 16:53:31 2012 +0100
fix conditionals detection
Change-Id: I50b335375b8b2ac67c50f887a4eb58456b9cea33
diff --git a/solenv/bin/update_pch.sh b/solenv/bin/update_pch.sh
index 0cda8f4..1302df4 100755
--- a/solenv/bin/update_pch.sh
+++ b/solenv/bin/update_pch.sh
@@ -30,7 +30,7 @@ for x in $headers; do
inobjects=
ifstack=0
while read line ; do
- if (test "$line" = "))") || (echo $line | grep -q ", "); then
+ if test "$line" = "))" ; then
inobjects=
elif echo $line | grep -q -e add_exception_objects -e add_noexception_objects -e add_cxxobject -e add_cxxobjects ; then
inobjects=1
@@ -43,7 +43,9 @@ for x in $headers; do
ifstack=$((ifstack - 1))
elif test -n "$inobjects" -a $ifstack -eq 0; then
file=$line
- if ! test -f "$root/$file".cxx ; then
+ if echo $line | grep -q ", "; then
+ true # $if() probably, or something similar
+ elif ! test -f "$root/$file".cxx ; then
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
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 1f5c039..13b85611 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -250,21 +250,16 @@
#include <numeric>
#include "osl/diagnose.h"
#include <osl/diagnose.h>
-#include "osl/file.hxx"
#include <osl/file.hxx>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
#include <osl/nlsupport.h>
-#include "osl/process.h"
#include <osl/security.hxx>
-#include <pwd.h>
-#include "rtl/bootstrap.hxx"
#include <rtl/bootstrap.hxx>
#include <rtl/instance.hxx>
#include <rtl/locale.h>
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
-#include "rtl/strbuf.hxx"
#include <rtl/strbuf.hxx>
#include <rtl/tencinfo.h>
#include <rtl/textenc.h>
@@ -354,7 +349,6 @@
#include <toolkit/helper/externallock.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <toolkit/unohlp.hxx>
-#include "tools/appendunixshellword.hxx"
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <tools/errinf.hxx>
@@ -370,7 +364,6 @@
#include <tools/string.hxx>
#include <tools/urlobj.hxx>
#include <unicode/uchar.h>
-#include <unistd.h>
#include "uno/lbnames.h"
#include <uno/mapping.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
commit 17e0f42234c67df60e5599289fdb2cda683bea6e
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Dec 18 16:46:40 2012 +0100
indent
Change-Id: I4c41f5f8b0498deacbe296804047befa5f19fa3d
diff --git a/solenv/bin/update_pch.sh b/solenv/bin/update_pch.sh
index 3756083..0cda8f4 100755
--- a/solenv/bin/update_pch.sh
+++ b/solenv/bin/update_pch.sh
@@ -11,48 +11,48 @@ root=`dirname $0`
root=`cd $root/../.. && pwd`
if test -z "$1"; then
-headers=`ls $root/*/inc/pch/precompiled_*.hxx`
+ headers=`ls $root/*/inc/pch/precompiled_*.hxx`
else
-headers="$1"
+ headers="$1"
fi
for x in $headers; do
-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="Library_$name.mk"
-
-tmpfile=`mktemp`
-
-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
- 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 $module/$makefile >&2
- else
- cat "$root/$file".cxx | grep -e '^\s*#include' | sed 's/\(#include [<"][^>"]*[>"]\).*/\1/' | sed 's#\.\./##g#' >>$tmpfile
- fi
- fi
- done
- )
+ 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="Library_$name.mk"
-cat >$header <<EOF
+ tmpfile=`mktemp`
+
+ 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
+ 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 $module/$makefile >&2
+ else
+ cat "$root/$file".cxx | grep -e '^\s*#include' | sed 's/\(#include [<"][^>"]*[>"]\).*/\1/' | sed 's#\.\./##g#' >>$tmpfile
+ fi
+ fi
+ done
+ )
+
+ cat >$header <<EOF
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
@@ -64,16 +64,16 @@ cat >$header <<EOF
EOF
-# Library_svx needs this (sendreportw32.cxx)
-if test "$makefile" = Library_svx.mk ; then
- cat >>$header <<EOF
+ # 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
+ fi
function local_file()
(
@@ -100,23 +100,23 @@ function filter_ignore()
grep -v -F -e '#include <editeng/eeitemid.hxx>'
)
-# " in #include "foo" breaks echo down below, so " -> @
-cat $tmpfile | sort -u | filter_ignore | sed 's/"/@/g' | \
- (
- while read line; do
- file=`echo $line | sed 's/.*[<"@]\([^>"@]*\)[>"@].*/\1/'`
- if ! local_file "$file"; then
- echo $line | sed 's/@/"/g' >>$header
- fi
- done
- )
+ # " in #include "foo" breaks echo down below, so " -> @
+ cat $tmpfile | sort -u | filter_ignore | sed 's/"/@/g' | \
+ (
+ while read line; do
+ file=`echo $line | sed 's/.*[<"@]\([^>"@]*\)[>"@].*/\1/'`
+ if ! local_file "$file"; then
+ echo $line | sed 's/@/"/g' >>$header
+ fi
+ done
+ )
-cat >>$header <<EOF
+ cat >>$header <<EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
EOF
-rm $tmpfile
+ rm $tmpfile
done
#echo Done.
More information about the Libreoffice-commits
mailing list