From: Ladislav Michl <[email protected]> Store the links to the host tools and kconfig in a separate variable for now the same as PTXDIST_TOPDIR.
Signed-off-by: Ladislav Michl <[email protected]> --- bin/ptxdist | 7 +++++-- rules/host-qemu.make | 2 +- rules/other/Toplevel.make | 6 +++--- scripts/lib/ptxd_lib_kconfig.sh | 6 +++--- scripts/lib/ptxd_make_nested.sh | 2 +- scripts/lib/ptxd_make_report.sh | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/bin/ptxdist b/bin/ptxdist index 2557cb9a2..94c41412f 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -2118,6 +2118,7 @@ _realpath() # # out: PTXDIST # PTXDIST_TOPDIR +# PTXDIST_HOSTTOOLS_DIR # PTXDIST_WORKSPACE # PTXDIST_PTXCONFIG_DEFAULT # PTXDIST_PLATFORMCONFIG_DEFAULT @@ -2142,6 +2143,7 @@ setup_topdir() { PTXDIST="${ptxdist}" PTXDIST_TOPDIR="${topdir}" + PTXDIST_HOSTTOOLS_DIR="${topdir}" PTXDIST_WORKSPACE="$(pwd)" eval PTXDIST_PTXCONFIG_DEFAULT="${PTXDIST_PTXCONFIG_DEFAULT}" @@ -2149,8 +2151,8 @@ setup_topdir() { eval PTXDIST_COLLECTIONCONFIG_DEFAULT="${PTXDIST_COLLECTIONCONFIG_DEFAULT}" eval PTXDIST_TOOLCHAIN_DEFAULT="${PTXDIST_TOOLCHAIN_DEFAULT}" - # ${PTXDIST_TOPDIR}/bin contains links to sane tools found by configure - export PATH="${PTXDIST_TOPDIR}/bin:${PATH}" + # ${PTXDIST_HOSTTOOLS_DIR}/bin contains links to sane tools found by configure + export PATH="${PTXDIST_HOSTTOOLS_DIR}/bin:${PATH}" } @@ -2727,6 +2729,7 @@ setup_export() { \ PTXDIST \ PTXDIST_TOPDIR \ + PTXDIST_HOSTTOOLS_DIR \ PTXDIST_SRCDIR \ PTXDIST_TEMPDIR \ PTXDIST_LIB_DIR \ diff --git a/rules/host-qemu.make b/rules/host-qemu.make index eef2dc133..77cd8dcea 100644 --- a/rules/host-qemu.make +++ b/rules/host-qemu.make @@ -249,7 +249,7 @@ ifdef PTXCONF_HOST_QEMU_USR -e 's|RTLDLIST=.*|RTLDLIST="$(PTXDIST_SYSROOT_TOOLCHAIN)$(QEMU_CROSS_DL)"|' \ -e 's|eval $$add_env|eval $(PTXDIST_SYSROOT_CROSS)/usr/bin/qemu-cross -E "$${add_env// /,}"|' \ -e 's|verify_out=`|verify_out=`$(PTXDIST_SYSROOT_CROSS)/usr/bin/qemu-cross |' \ - -e 's|#! */.*$$|#!$(shell readlink $(PTXDIST_TOPDIR)/bin/bash)|' \ + -e 's|#! */.*$$|#!$(shell readlink $(PTXDIST_HOSTTOOLS_DIR)/bin/bash)|' \ $(PTXDIST_SYSROOT_TOOLCHAIN)/usr/bin/ldd > $(PTXDIST_SYSROOT_CROSS)/usr/bin/qemu/ldd @chmod +x $(PTXDIST_SYSROOT_CROSS)/usr/bin/qemu/ldd endif diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make index 44a030825..5dec61bb3 100644 --- a/rules/other/Toplevel.make +++ b/rules/other/Toplevel.make @@ -8,7 +8,7 @@ ifneq ($(findstring n,$(filter-out --%,$(MAKEFLAGS))),) MAKE=true SHELL=true define ptx/force-shell -$(eval SHELL=$(realpath $(PTXDIST_TOPDIR)/bin/bash))$(shell $(1))$(eval SHELL=true) +$(eval SHELL=$(realpath $(PTXDIST_HOSTTOOLS_DIR)/bin/bash))$(shell $(1))$(eval SHELL=true) endef define ptx/force-sh $(eval SHELL=/bin/sh)$(shell $(1))$(eval SHELL=true) @@ -17,12 +17,12 @@ define ptx/sh endef else # make sure bash is used to execute commands from makefiles -SHELL=$(realpath $(PTXDIST_TOPDIR)/bin/bash) +SHELL=$(realpath $(PTXDIST_HOSTTOOLS_DIR)/bin/bash) define ptx/force-shell $(shell $(1)) endef define ptx/force-sh -$(eval SHELL=/bin/sh)$(shell $(1))$(eval SHELL=$(realpath $(PTXDIST_TOPDIR)/bin/bash)) +$(eval SHELL=/bin/sh)$(shell $(1))$(eval SHELL=$(realpath $(PTXDIST_HOSTTOOLS_DIR)/bin/bash)) endef define ptx/sh $(call ptx/force-sh,$(1)) diff --git a/scripts/lib/ptxd_lib_kconfig.sh b/scripts/lib/ptxd_lib_kconfig.sh index 0cec1edac..625a32c8a 100644 --- a/scripts/lib/ptxd_lib_kconfig.sh +++ b/scripts/lib/ptxd_lib_kconfig.sh @@ -781,9 +781,9 @@ ptxd_kconfig() { ;; esac - local conf="${PTXDIST_TOPDIR}/scripts/kconfig/conf" - local mconf="${PTXDIST_TOPDIR}/scripts/kconfig/mconf" - local nconf="${PTXDIST_TOPDIR}/scripts/kconfig/nconf" + local conf="${PTXDIST_HOSTTOOLS_DIR}/scripts/kconfig/conf" + local mconf="${PTXDIST_HOSTTOOLS_DIR}/scripts/kconfig/mconf" + local nconf="${PTXDIST_HOSTTOOLS_DIR}/scripts/kconfig/nconf" export \ KCONFIG_NOTIMESTAMP="1" \ diff --git a/scripts/lib/ptxd_make_nested.sh b/scripts/lib/ptxd_make_nested.sh index 54535377f..35087034c 100644 --- a/scripts/lib/ptxd_make_nested.sh +++ b/scripts/lib/ptxd_make_nested.sh @@ -47,7 +47,7 @@ ptxd_make_nested_ptxdist() { args=( "cd" "${pkg_workspace}" "&&" "${PTXDIST_TOPDIR}/bin/ptxdist" ) PTXDIST_TOOLCHAIN="$(readlink "${PTXDIST_PLATFORMDIR}/selected_toolchain")" - PATH=$(sed -e 's;[^:]*/sysroot-\(host\|cross\)/[^:]*:;;g' -e "s;${PTXDIST_TOPDIR}/bin:;;" -e "s;${PTXDIST_TOOLCHAIN}:;;" <<< "${PATH}") + PATH=$(sed -e 's;[^:]*/sysroot-\(host\|cross\)/[^:]*:;;g' -e "s;${PTXDIST_HOSTTOOLS_DIR}/bin:;;" -e "s;${PTXDIST_TOOLCHAIN}:;;" <<< "${PATH}") if [ "${PTXDIST_WORKSPACE}" != "${pkg_workspace}" ]; then unset PTXDIST_PLATFORMDIR diff --git a/scripts/lib/ptxd_make_report.sh b/scripts/lib/ptxd_make_report.sh index 7eea60900..7f8ad07ad 100644 --- a/scripts/lib/ptxd_make_report.sh +++ b/scripts/lib/ptxd_make_report.sh @@ -24,7 +24,7 @@ ptxd_make_bsp_report_header() { do_path() { local orig_IFS="${IFS}" # only the paths added by PTXdist - local path="${2%:${PTXDIST_TOPDIR}/bin:*}:${PTXDIST_TOPDIR}/bin" + local path="${2%:${PTXDIST_HOSTTOOLS_DIR}/bin:*}:${PTXDIST_HOSTTOOLS_DIR}/bin" echo "${indent}${1}" awk "BEGIN { RS=\":\" } { if (\$1) print \"${indent}- '\" \$1 \"'\" }" <<<"${path}" } -- 2.47.3
