From 686fca1863b4f0650b0e1e28cb7b68aadc64ba6f Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Tue, 24 Jan 2023 13:10:47 +0000 Subject: [PATCH] Move `HOST_ARCH` declaration to common.mak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition, add the ability that a Makefile that includes `common.mak` can specify the `HOST_ARCH`. Usage example: $S390_TOOLS/mytool/Makefile: ``` Makefile HOST_ARCH := s390x include ../common.mak ``` Reviewed-by: Steffen Eiden Reviewed-by: Jan Höppner Signed-off-by: Marc Hartmayer Signed-off-by: Steffen Eiden --- Makefile | 2 -- common.mak | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ffc92f5b..ab42c268 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -HOST_ARCH := $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sun4u/sparc64/' -e 's/arm.*/arm/' -e 's/sa110/arm/') - # Include common definitions include common.mak diff --git a/common.mak b/common.mak index 1d88254f..60145d2e 100644 --- a/common.mak +++ b/common.mak @@ -12,6 +12,8 @@ MAKECMDGOALS ?= ifeq ($(COMMON_INCLUDED),false) COMMON_INCLUDED := true +HOST_ARCH ?= $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sun4u/sparc64/' -e 's/arm.*/arm/' -e 's/sa110/arm/') + # Global definitions # The variable "DISTRELEASE" should be overwritten in rpm spec files with: # "make DISTRELEASE=%{release}" and "make install DISTRELEASE=%{release}"