From fd9366c85cdb627886901b7c09ef267b294d5d98 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sat, 24 Dec 2011 19:25:58 -0600 Subject: 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. --- set_soenv.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'set_soenv.in') 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 -- cgit