summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-12-11 07:49:24 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-12-11 14:26:30 +0000
commitae4e327739112ba326a2945fc0d5550739f3083d (patch)
treed8430835484c045cd334fc596dcc627cf98aa430 /g
parent8532cbd3e685d7a1e4e26bf7c2b7bf0b1c38c5be (diff)
Prepare for read-only source build
This patch allows to do mkdir <build_dir> cd <build_dir> <src_root>/autogen.sh make Only the remaining dmake modules are poluting the <src_root>... which will get eventually convererd to gmake... Change-Id: Iefd64732fa12e096d554cff4eee6b777deb92338 Reviewed-on: https://gerrit.libreoffice.org/1273 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'g')
-rwxr-xr-xg13
1 files changed, 10 insertions, 3 deletions
diff --git a/g b/g
index 288489cfd2f8..711318b11913 100755
--- a/g
+++ b/g
@@ -10,9 +10,16 @@ fi
SUBMODULES_ALL="dictionaries helpcontent2 translations"
pushd $(dirname $0) > /dev/null
-COREDIR=$(pwd)
+if [ -f config_host.mk ] ; then
+ # we are in the BUILD_DIR
+ SRC_ROOT=$(cat ${BUILD_DIR}/config_host.mk | grep SRC_ROOT | sed -e "s/.*=//")
+else
+ SRC_ROOT=$(pwd)
+fi
popd > /dev/null
+COREDIR="$SRC_ROOT"
+
usage()
{
git
@@ -114,8 +121,8 @@ local repo
get_configured_submodules()
{
SUBMODULES_CONFIGURED=""
- if [ -f "config_host.mk" ] ; then
- SUBMODULES_CONFIGURED=$(cat config_host.mk | grep GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
+ if [ -f "${BUILD_DIR}/config_host.mk" ] ; then
+ SUBMODULES_CONFIGURED=$(cat ${BUILD_DIR}/config_host.mk | grep GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
else
# if we need the configured submoduel before the configuration is done. we assumed you want them all
SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}