Explorar o código

[Pal] Makefile.Host: define/export SYS if it's not defined

Makefile.Host can be called with PAL_HOST defined but SYS undefined.
Also export SYS.
Isaku Yamahata %!s(int64=5) %!d(string=hai) anos
pai
achega
723af03513
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Pal/src/Makefile.Host

+ 2 - 1
Pal/src/Makefile.Host

@@ -1,7 +1,7 @@
 all_hosts = Skeleton Linux Linux-SGX FreeBSD
 
+SYS ?= $(shell gcc -dumpmachine)
 ifeq ($(PAL_HOST),)
-SYS := $(shell gcc -dumpmachine)
 ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
 PAL_HOST := Linux
 else ifeq ($(findstring freebsd,$(SYS)),freebsd)
@@ -23,6 +23,7 @@ ifeq ($(findstring $(PAL_HOST),$(all_hosts)),)
 $(error Unsupported platform: $(PAL_HOST))
 endif
 
+export SYS
 export PAL_HOST
 export PAL_HOST_MACRO = $(shell echo $(PAL_HOST) | tr '[:lower:]' '[:upper:]' | tr '-' '_')