build: Fixes to support building in paths with spaces in them.

Now that HAIKU_TOP is a relative path, nearly all paths Jam actually
has to deal with will never contain spaces, so this is now feasible.
Only one issue remains after this commit (namely, setting
HOST_BUILD_COMPATIBILITY_LIB_DIR.)
This commit is contained in:
Augustin Cavalier 2019-01-09 18:52:02 -05:00
parent 134e58ec8d
commit 1d91b37193
3 changed files with 8 additions and 8 deletions

View File

@ -413,7 +413,7 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
} }
HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
= "export LIBRARY_PATH=$LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; = "export \"LIBRARY_PATH=$LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)\"" ;
HOST_PTHREAD_LINKFLAGS = ; HOST_PTHREAD_LINKFLAGS = ;
HOST_LIBRARY_NAME_MAP_input_server = /system/servers/input_server ; HOST_LIBRARY_NAME_MAP_input_server = /system/servers/input_server ;
HOST_DEFINES += __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS ; HOST_DEFINES += __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS ;
@ -430,10 +430,10 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
= "export PATH=$PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; = "export PATH=$PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
} else if $(HOST_PLATFORM) = darwin { } else if $(HOST_PLATFORM) = darwin {
HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
= "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; = "export \"DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)\"" ;
} else { } else {
HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
= "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; = "export \"LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)\"" ;
} }
HOST_PTHREAD_LINKFLAGS = -pthread ; HOST_PTHREAD_LINKFLAGS = -pthread ;

8
configure vendored
View File

@ -216,7 +216,7 @@ real_path()
relative_to() relative_to()
{ {
perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' \ perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' \
$1 $2 "$1" "$2"
} }
# valid_toolchain # valid_toolchain
@ -525,7 +525,7 @@ if [ "$1" = "--update" ]; then
"encoded into '$buildConfigFile' - updating not possible." "encoded into '$buildConfigFile' - updating not possible."
exit 1 exit 1
fi fi
cd $lastPwd cd "$lastPwd"
if [ -n "$lastEnv" ]; then if [ -n "$lastEnv" ]; then
export $lastEnv export $lastEnv
fi fi
@ -556,7 +556,7 @@ if [ `umask` -gt 22 ]; then
exit 1 exit 1
fi fi
# ensure git checkout was not done with a restrictive umask # ensure git checkout was not done with a restrictive umask
if [ `stat -c '%a' $sourceDir/data/system/boot/SetupEnvironment` -lt 644 ]; then if [ `stat -c '%a' "$sourceDir/data/system/boot/SetupEnvironment"` -lt 644 ]; then
echo "The source tree was cloned with a umask > 0022. It seems you" echo "The source tree was cloned with a umask > 0022. It seems you"
echo have already corrected your umask, but not re-checked-out the echo have already corrected your umask, but not re-checked-out the
echo source tree. Try running: echo source tree. Try running:
@ -1055,7 +1055,7 @@ HOST_EXTENDED_REGEX_SED ?= ${HOST_EXTENDED_REGEX_SED} ;
HOST_SHA256 ?= ${HOST_SHA256} ; HOST_SHA256 ?= ${HOST_SHA256} ;
HAIKU_NASM ?= ${HAIKU_NASM} ; HAIKU_NASM ?= ${HAIKU_NASM} ;
HAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ; HAIKU_BUILD_ATTRIBUTES_DIR ?= "${HAIKU_BUILD_ATTRIBUTES_DIR}" ;
HOST_HAIKU_PORTER ?= ${HOST_HAIKU_PORTER} ; HOST_HAIKU_PORTER ?= ${HOST_HAIKU_PORTER} ;
HAIKU_PORTS ?= ${HAIKU_PORTS} ; HAIKU_PORTS ?= ${HAIKU_PORTS} ;

View File

@ -13,7 +13,7 @@ UsePrivateBuildHeaders kernel libroot system ;
{ {
local defines = [ FDefines local defines = [ FDefines
HAIKU_BUILD_ATTRIBUTES_DIR="\\\"$(HAIKU_BUILD_ATTRIBUTES_DIR)\\\"" 'HAIKU_BUILD_ATTRIBUTES_DIR="\"$(HAIKU_BUILD_ATTRIBUTES_DIR)\""'
_HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS=1 _HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS=1
] ; ] ;
SubDirCcFlags $(defines) ; SubDirCcFlags $(defines) ;