platform.mk: Replace get-os.sh by jw-pkg.py distro info

To reduce redundancy, replace get-os.py by jw-pkg-py distro info.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-02 10:44:05 +01:00
commit fa65047d2f

View file

@ -50,10 +50,6 @@ include $(JWBDIR)/make/py-version.mk
JW_PKG_PY = $(PYTHON) $(JWB_SCRIPT_DIR)/jw-pkg.py -p $(PROJECTS_DIR) -t $(TOPDIR) --topdir-format absolute $(JW_PKG_PY_EXTRA_OPTS)
ifndef GET_OS_SH
GET_OS_SH := $(SHELL) $(JWB_SCRIPT_DIR)/get-os.sh
endif
# -- product
TARGET_PRODUCTS_ARM_NONE_EABI = \
@ -76,7 +72,7 @@ endif
# -- arch, vendor, os, libc
ifeq ($(HOST_TUPLE),)
HOST_TUPLE := $(shell $(GET_OS_SH) tuple)
HOST_TUPLE := $(shell $(JW_PKG_PY) distro info --format '%{gnu-triplet}')
HOST_TUPLE_WORDS := $(subst -, ,$(HOST_TUPLE))
HOST_ARCH := $(word 1,$(HOST_TUPLE_WORDS))
HOST_VENDOR := $(word 2,$(HOST_TUPLE_WORDS))
@ -184,11 +180,11 @@ else
endif
ifeq ($(OS_NAME_VERSION),)
OS_NAME_VERSION := $(shell $(GET_OS_SH))
OS_NAME_VERSION := $(shell $(JW_PKG_PY) distro info --format '%{id}-%{codename}')
endif
ifeq ($(OS_NAME),)
OS_NAME := $(shell $(GET_OS_SH) name)
OS_NAME := $(word 1,$(subst -, ,$(OS_NAME_VERSION)))
endif
ARCH ?= $(TARGET_ARCH)