diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index 13c9a4a620..895327065f 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -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 diff --git a/configure b/configure index 4667dae2d4..966cdd20a0 100755 --- a/configure +++ b/configure @@ -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}" ; diff --git a/src/apps/haikudepot/build/jam/HdsSchemaGenRules b/src/apps/haikudepot/build/jam/HdsSchemaGenRules index c72a3e15e2..8c3bf8c1d5 100644 --- a/src/apps/haikudepot/build/jam/HdsSchemaGenRules +++ b/src/apps/haikudepot/build/jam/HdsSchemaGenRules @@ -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) }