summaryrefslogtreecommitdiff
path: root/set_soenv.in
diff options
context:
space:
mode:
Diffstat (limited to 'set_soenv.in')
-rwxr-xr-xset_soenv.in10
1 files changed, 7 insertions, 3 deletions
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