summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rwxr-xr-xbootstrap9
-rw-r--r--config_host.mk.in5
-rw-r--r--configure.in10
-rwxr-xr-xdownload2
-rwxr-xr-xset_soenv.in10
-rwxr-xr-xsolenv/bin/create-ids2
-rwxr-xr-xsolenv/bin/create-tags2
-rwxr-xr-xsolenv/bin/lo_proxy_start4
-rw-r--r--solenv/gbuild/extensions/post_AuxTargets.mk2
-rw-r--r--solenv/gbuild/extensions/post_BuildplTargets.mk2
-rw-r--r--solenv/gbuild/extensions/post_SpeedUpTargets.mk14
-rw-r--r--solenv/gbuild/source_and_rerun.mk2
13 files changed, 46 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index 705ddbdf1a4f..11ed5b6951ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,8 @@
/config.log
/config.status
/config.parms
+/config_host.mk
+/config_build.mk
/configure
/desktop/scripts/soffice.sh
/makefile.mk
diff --git a/bootstrap b/bootstrap
index 26ade9a9ce89..9faa842f304c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,5 +1,14 @@
#!/bin/sh
+if test -z "${SRC_ROOT}"; then
+ if test -f ./config_build.mk ; then
+ . ./config_build.mk
+ else
+ if test -f ./config_host.mk ; then
+ . ./config_host.mk
+ fi
+ fi
+fi
if test -z "${SOLARENV}"; then
if test -f ./Env.Build.sh ; then
. ./Env.Build.sh
diff --git a/config_host.mk.in b/config_host.mk.in
new file mode 100644
index 000000000000..35b9779c8291
--- /dev/null
+++ b/config_host.mk.in
@@ -0,0 +1,5 @@
+ # config variable for LibreOffice
+ # this file is intented to be able to be included in a Makefile
+ # or to be sourced in a shell session
+ #
+export SRC_ROOT="@SRC_ROOT@"
diff --git a/configure.in b/configure.in
index 8ef3cdb9caa2..b0e09b5da237 100644
--- a/configure.in
+++ b/configure.in
@@ -2240,6 +2240,7 @@ if test "$cross_compiling" = "yes"; then
bin/repo-list.in \
build_env.in \
config.guess \
+ config_host.mk.in \
configure \
ooo.lst.in \
oowintool \
@@ -2271,8 +2272,11 @@ if test "$cross_compiling" = "yes"; then
$sub_conf_opts \
2>&1 | sed -e 's/^/ /'
test -f ./Env.Host.sh 2>/dev/null || exit
+ test -f ./config_host.mk 2>/dev/null || exit
+ cp config_host.mk ../config_build.mk
cp Env.Host.sh ../Env.Build.sh
cp config.log ../config.Build.log
+ . ./config_host.mk
. ./Env.Host.sh
for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX GXX_INCLUDE_PATH MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \
SYSTEM_LIBXSLT; do
@@ -2295,8 +2299,10 @@ if test "$cross_compiling" = "yes"; then
done
)
test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log])
+ test -f config_build.mk || AC_MSG_ERROR([A file called Env.Build.sh was supposed to have been copied here, but it isn't found])
test -f Env.Build.sh || AC_MSG_ERROR([A file called Env.Build.sh was supposed to have been copied here, but it isn't found])
perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh
+ perl -pi -e 's,/CONF-FOR-BUILD,,g' config_build.mk
eval `cat CONF-FOR-BUILD/build-config`
AC_MSG_RESULT([checking for BUILD platform configuration... done])
rm -rf CONF-FOR-BUILD
@@ -9746,7 +9752,7 @@ else
echo > set_soenv.last
fi
-AC_CONFIG_FILES([ooo.lst set_soenv bin/repo-list desktop/scripts/soffice.sh build_env])
+AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list desktop/scripts/soffice.sh build_env])
AC_OUTPUT
# make sure this is executable
@@ -9765,6 +9771,6 @@ dnl Run the set_soenv script to setup the Env.Host.sh script that sets
dnl environment variables for the build.
chmod +x set_soenv
-./set_soenv
+. ./config_host.mk && ./set_soenv
dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/download b/download
index 279263ca6180..a1548760e101 100755
--- a/download
+++ b/download
@@ -28,7 +28,7 @@
# environment setup yet?
if [ -z "$TARFILE_LOCATION" ]; then
- . ./Env.Host.sh
+ . ./config_host.mk && . ./Env.Host.sh
fi
# we want to clone if we are in the bootstrap git repo and clone does not exist yet
diff --git a/set_soenv.in b/set_soenv.in
index b88c0cfc0d91..6b97f3ba0c84 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -741,8 +741,8 @@ print "done\n";
#
# If the directory does not exist something is strange.
# 1. LibreOffice build home directory.
-chomp($SRC_ROOT = `pwd`);
-$SRC_ROOT = PathFormat($SRC_ROOT);
+# SRC_ROOT should already be in the env due to config_host.mk
+$SRC_ROOT = $ENV{"SRC_ROOT"};
CheckPathExist( $SRC_ROOT );
@@ -1337,7 +1337,6 @@ open( OUT, ">$SRC_ROOT/$outfile" ) ||
# Write file header.
CreateFileHeader( *OUT, $UPD, $platform, "sh/bash/ksh", "#" );
-ToFile( "SRC_ROOT", $SRC_ROOT, "e" );
ToFile( "OOO_SHELL", $OOO_SHELL, "e" );
ToFile( "JAVA_HOME", $JAVA_HOME, "e" );
ToFile( "L10N_MODULE", $L10N_MODULE, "e" );
@@ -2135,6 +2134,11 @@ sub CreateFileHeader
print { $filehandle } "$comment 2. source $outfile $newline";
print { $filehandle } "$comment #################################################################";
print { $filehandle } $newline;
+ print { $filehandle } 'if test -z "$SRC_ROOT" ; then';
+ print { $filehandle } $newline;
+ print { $filehandle } " . $SRC_ROOT/config_host.mk $newline";
+ print { $filehandle } "fi $newline";
+ print { $filehandle } $newline;
}
#---------------------------------------------------------
# Function name: ToFile
diff --git a/solenv/bin/create-ids b/solenv/bin/create-ids
index 5b43d20168b8..8744a387e5cb 100755
--- a/solenv/bin/create-ids
+++ b/solenv/bin/create-ids
@@ -2,7 +2,7 @@
# create ID file for the whole LibO tree. run it in toplevel dir
-. ./Env.Host.sh
+./config_host.mk && . ./Env.Host.sh
# --with-outpath includes projects/$INPATH/inc (also solver/$INPATH/inc)
if [ "$1" = "--with-outpath" ]; then
diff --git a/solenv/bin/create-tags b/solenv/bin/create-tags
index c93bcd9bf52c..4d0f2bd9b10a 100755
--- a/solenv/bin/create-tags
+++ b/solenv/bin/create-tags
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
-. ./Env.Host.sh
+./config_host.mk && . ./Env.Host.sh
omnicppoptions="--c++-kinds=+p --fields=+iaS --extra=+q"
ctags -h "+.hdl.hrc" --langmap=c:+.hdl.hrc.src $omnicppoptions \
diff --git a/solenv/bin/lo_proxy_start b/solenv/bin/lo_proxy_start
index 67dcabf5c18a..8aabf2838acd 100755
--- a/solenv/bin/lo_proxy_start
+++ b/solenv/bin/lo_proxy_start
@@ -12,8 +12,8 @@ if [ -z "$SRC_ROOT" ] ; then
SRC_ROOT=$($bin_dir/lo_find_src_root) || exit 1
fi
if [ -z "$SOLARINC" ] ; then
- if [ -e "$SRC_ROOT/config.mk" ] ; then
- . "$SRC_ROOT/config.mk"
+ if [ -e "$SRC_ROOT/config_host.mk" ] ; then
+ . "$SRC_ROOT/config_host.mk"
fi
if [ -e "$SRC_ROOT/Env.Host.sh" ] ; then
. "$SRC_ROOT/Env.Host.sh"
diff --git a/solenv/gbuild/extensions/post_AuxTargets.mk b/solenv/gbuild/extensions/post_AuxTargets.mk
index 72414b7d771b..354a91bd6b52 100644
--- a/solenv/gbuild/extensions/post_AuxTargets.mk
+++ b/solenv/gbuild/extensions/post_AuxTargets.mk
@@ -78,7 +78,7 @@ clean-build:
distclean: clean
if [ -f $(SRCDIR)/dmake/Makefile ] ; then $(GNUMAKE) -C $(SRCDIR)/dmake clean; fi
- cd $(SRCDIR) && rm -rf Env.Host.sh autogen.lastrun autom4te.cache \
+ cd $(SRCDIR) && rm -rf config_host.mk config_build.mk Env.Host.sh Env.Build.sh autogen.lastrun autom4te.cache \
bin/repo-list build_env config.log config.status \
desktop/scripts/soffice.sh ooo.lst post_download post_download.log \
set_soenv set_soenv.last set_soenv.stamp src.downloaded warn
diff --git a/solenv/gbuild/extensions/post_BuildplTargets.mk b/solenv/gbuild/extensions/post_BuildplTargets.mk
index b2e650df8cc0..4b60eb263771 100644
--- a/solenv/gbuild/extensions/post_BuildplTargets.mk
+++ b/solenv/gbuild/extensions/post_BuildplTargets.mk
@@ -117,7 +117,7 @@ build: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(I
$(call gb_BuildplTarget_command,instsetoo_native,--all)
cross_toolset: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded
- source $(SRCDIR)/Env.Build.sh && $(call gb_BuildplTarget_command,$@,--all)
+ source $(SRCDIR)/config_build.mk && source $(SRCDIR)/Env.Build.sh && $(call gb_BuildplTarget_command,$@,--all)
# experimental callcatcher target
# http://www.skynet.ie/~caolan/Packages/callcatcher.html
diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
index 0abbe5ecc83c..f6df03bd37fc 100644
--- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk
+++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
@@ -1,24 +1,24 @@
# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#
+#
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
+#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
-#
+#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
-#
+#
# Major Contributor(s):
# [ Copyright (C) 2011 Bjoern Michaelsen <bjoern.michaelsen@canonical.com> (initial developer) ]
-#
+#
# All Rights Reserved.
-#
+#
# For minor contributions see the git repository.
-#
+#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
diff --git a/solenv/gbuild/source_and_rerun.mk b/solenv/gbuild/source_and_rerun.mk
index a2aaea0687a6..4d8101a0c3b5 100644
--- a/solenv/gbuild/source_and_rerun.mk
+++ b/solenv/gbuild/source_and_rerun.mk
@@ -21,7 +21,7 @@ endif
source-env-and-recurse:
@$(gb_SourceEnvAndRecurse_reconfigure) && \
- if test -f $(SRCDIR)/config.mk ; then . $(SRCDIR)/config.mk; fi && \
+ if test -f $(SRCDIR)/config_host.mk ; then . $(SRCDIR)/config_host.mk; fi && \
if test -f $(SRCDIR)/Env.Host.sh; then . $(SRCDIR)/Env.Host.sh; fi && \
if test -z "$${SOLARENV}"; then echo "no configuration found and could not create one" && exit 1; fi && \
$(gb_SourceEnvAndRecurse_buildpl) && \