mirror of https://github.com/aristocratos/btop.git
Fixed: Makefile g++ -dumpmachine failure to get platform on some distros
This commit is contained in:
parent
997bfd2712
commit
f15c2fdcf6
7
Makefile
7
Makefile
|
@ -14,8 +14,11 @@ endif
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
#? Detect PLATFORM and ARCH from gcc if not set
|
#? Detect PLATFORM and ARCH from uname/gcc if not set
|
||||||
PLATFORM ?= $(shell $(CXX) -dumpmachine | awk -F"-" '{ print (NF==4) ? $$3 : $$2 }')
|
PLATFORM ?= $(shell uname -s || echo unknown)
|
||||||
|
ifneq ($(filter unknown darwin, $(PLATFORM)),)
|
||||||
|
override PLATFORM := $(shell $(CXX) -dumpmachine | awk -F"-" '{ print (NF==4) ? $$3 : $$2 }')
|
||||||
|
endif
|
||||||
ARCH ?= $(shell $(CXX) -dumpmachine | cut -d "-" -f 1)
|
ARCH ?= $(shell $(CXX) -dumpmachine | cut -d "-" -f 1)
|
||||||
|
|
||||||
override PLATFORM_LC := $(shell echo $(PLATFORM) | tr '[:upper:]' '[:lower:]')
|
override PLATFORM_LC := $(shell echo $(PLATFORM) | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
Loading…
Reference in New Issue