mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
HaikuDepot: Build Configure for Python
Some operating systems only ship with Python 3 and the binary for this is 'python3' instead of 'python' which causes the Jam build process to fail because it expects to find 'python'. This change will mean that the configure process will detect this case and configure the build to use the correct binary name. Fixes #14938 Change-Id: I30cd0df828792715a54d760b86dd79aee04e2b2f Reviewed-on: https://review.haiku-os.org/c/1134 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
c91b716e09
commit
17dc34acd6
@ -567,6 +567,10 @@ HOST_BE_API_CCFLAGS = -include [ FDirName $(HAIKU_TOP) headers build
|
||||
BeOSBuildCompatibility.h ] ;
|
||||
HOST_BE_API_C++FLAGS = $(HOST_BE_API_CCFLAGS) ;
|
||||
|
||||
if ! $(HOST_PYTHON) {
|
||||
Echo "HOST_PYTHON variable not defined --> will default to 'python'" ;
|
||||
HOST_PYTHON ?= "python" ;
|
||||
}
|
||||
|
||||
#pragma mark - target platform settings
|
||||
|
||||
|
10
configure
vendored
10
configure
vendored
@ -821,6 +821,15 @@ if [ $HOST_PLATFORM = "darwin" ]; then
|
||||
HOST_EXTENDED_REGEX_SED="sed -E"
|
||||
fi
|
||||
|
||||
if command -v "python3" ; then
|
||||
HOST_PYTHON="python3"
|
||||
elif command -v "python" ; then
|
||||
HOST_PYTHON="python"
|
||||
else
|
||||
echo "a python interpreter is required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if nasm can actually output ELF files
|
||||
# (the stock version in OSX can't)
|
||||
# XXX: should probably only test for x86* arch
|
||||
@ -1056,6 +1065,7 @@ HOST_LD ?= ${HOST_GCC_LD} ;
|
||||
HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ;
|
||||
HOST_EXTENDED_REGEX_SED ?= ${HOST_EXTENDED_REGEX_SED} ;
|
||||
HOST_SHA256 ?= ${HOST_SHA256} ;
|
||||
HOST_PYTHON ?= ${HOST_PYTHON} ;
|
||||
HAIKU_NASM ?= ${HAIKU_NASM} ;
|
||||
|
||||
HAIKU_BUILD_ATTRIBUTES_DIR ?= "${HAIKU_BUILD_ATTRIBUTES_DIR}" ;
|
||||
|
@ -45,7 +45,7 @@ rule HdsSchemaGenModel
|
||||
actions HdsSchemaGenModel1
|
||||
{
|
||||
mkdir -p $(2[3])
|
||||
python $(2[2]) -i $(2[1]) --outputdirectory $(2[3])
|
||||
$(HOST_PYTHON) $(2[2]) -i $(2[1]) --outputdirectory $(2[3])
|
||||
touch $(1)
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ rule HdsSchemaGenBulkParser
|
||||
actions HdsSchemaGenBulkParser1
|
||||
{
|
||||
mkdir -p $(2[3])
|
||||
python $(2[2]) -i $(2[1]) --outputdirectory $(2[3]) --supportbulkcontainer
|
||||
$(HOST_PYTHON) $(2[2]) -i $(2[1]) --outputdirectory $(2[3]) --supportbulkcontainer
|
||||
touch $(1)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user