summaryrefslogtreecommitdiff
path: root/set_soenv.in
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-12-24 19:25:58 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-12-24 21:42:08 -0600
commitfd9366c85cdb627886901b7c09ef267b294d5d98 (patch)
treeff731698e13c1704c03aaab40957cf40a34db969 /set_soenv.in
parentcdd98fc187aae086de5e4ca5fe4d693568963431 (diff)
prep work to eliminated Env.*.sh, introduce config_{host,build}.mk
This introduce config_host.mk and config_build.mk generated from config_host.mk.in The intent is for that file to be both sourcable in a shell and includable in a gnu Makefile. Eventually all the environment set-up will be in config_host.mk.in and so there won't be a need to source anything in shell before make.
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