From d85a0b70cc415e9a1ba1eeaeb5917bdd8e1be767 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 4 Jan 2016 22:46:34 +0100 Subject: [PATCH] Add /etc/machine. --- Makefile | 3 +++ build-aux/platform.mak | 1 + 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index d8549ebf..7aaf7921 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,7 @@ endif for ENTRY in $$(ls -A "$(SYSROOT)" | grep -Ev '^(dev|etc|home|mnt|root|src|tix|tmp|var)$$'); do \ cp -RTv "$(SYSROOT)/$$ENTRY" "$(DESTDIR)/$$ENTRY" || exit $$?; \ done + cp -TPv "$(SYSROOT)/etc/machine" "$(DESTDIR)/etc/machine" cp -TPv "$(SYSROOT)/etc/os-release" "$(DESTDIR)/etc/os-release" cp -TPv "$(SYSROOT)/etc/sortix-release" "$(DESTDIR)/etc/sortix-release" @@ -158,6 +159,8 @@ sysroot-system: sysroot-fsh sysroot-base-headers echo /usr >> "$(SYSROOT)/tix/manifest/system" echo /var >> "$(SYSROOT)/tix/manifest/system" echo /var/empty >> "$(SYSROOT)/tix/manifest/system" + echo "$(HOST_MACHINE)" > "$(SYSROOT)/etc/machine" + echo /etc/machine >> "$(SYSROOT)/tix/manifest/system" (echo 'NAME="Sortix"' && \ echo 'VERSION="$(VERSION)"' && \ echo 'ID=sortix' && \ diff --git a/build-aux/platform.mak b/build-aux/platform.mak index 02aac2c3..a7677643 100644 --- a/build-aux/platform.mak +++ b/build-aux/platform.mak @@ -40,6 +40,7 @@ endif # Determine the platform the software will run on. HOST?=$(BUILD) +HOST_MACHINE:=$(shell expr x$(HOST) : 'x\([^-]*\).*') # Determine the platform the software will target. TARGET?=$(HOST)