diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk index 107f0b3703ef..5ea6b55e95f0 100644 --- a/sal/Library_sal.mk +++ b/sal/Library_sal.mk @@ -181,9 +181,13 @@ $(eval $(call gb_Library_add_exception_objects,sal,\ sal/osl/unx/module \ sal/osl/unx/process \ sal/osl/unx/process_impl \ - $(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \ sal/osl/unx/uunxapi \ )) +ifeq ($(filter-out DESKTOP,$(BUILD_TYPE)),) +$(eval $(call gb_Library_add_exception_objects,sal,\ + sal/osl/unx/salinit \ +)) +endif $(eval $(call gb_Library_add_cobjects,sal,\ sal/osl/unx/mutex \ sal/osl/unx/nlsupport \ diff --git a/solenv/bin/update_pch.sh b/solenv/bin/update_pch.sh new file mode 100755 index 000000000000..864d0df3bdcb --- /dev/null +++ b/solenv/bin/update_pch.sh @@ -0,0 +1,92 @@ +#! /bin/bash +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +root=`dirname $0` +root=`cd $root/../.. && pwd` + +if test -z $1; then +headers=`ls $root/*/inc/pch/precompiled_*.hxx` +else +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="$root/$module/Library_$name.mk" + +tmpfile=`mktemp` + +cat "$makefile" | sed 's#\\$##' | \ + ( + inobjects= + 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 + file=$line + if ! test -f "$root/$file".cxx ; then + echo No file $file in makefile `echo $makefile | sed -e s%$root/%%` >&2 + else + cat "$root/$file".cxx | grep -e '^\s*#include' | sed 's/\(#include [<"][^<"]*[>"]\).*/\1/' | sed 's#\.\./##g#' >>$tmpfile + fi + fi + done + ) + +cat >$header < @ +cat $tmpfile | sort -u | skip_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 <