Skip to content

Commit

Permalink
build: improve makefile to be os agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed May 7, 2024
1 parent be8d64e commit 9d29211
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,26 @@ CLOUDFLARE_ENDPOINT ?= https://07be8d2fbc940503ca1be344714cb0d1.r2.cloudflaresto
CLOUDFLARE_BUCKET ?= dist-staging
CLOUDFLARE_PROFILE ?= worker
LOGLEVEL ?= silent
OSTYPE := $(shell uname -s | tr '[:upper:]' '[:lower:]')
ifeq ($(findstring os/390,$OSTYPE),os/390)
OSTYPE ?= os390
ifeq ($(OS),Windows_NT)
OSTYPE := windows

ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
OSTYPE := arm64
else
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSTYPE := arm64
else ifeq ($(PROCESSOR_ARCHITECTURE),x86)
OSTYPE := x86
endif
endif
else
ARCHTYPE := $(shell uname -m | tr '[:upper:]' '[:lower:]')
OSTYPE := $(shell uname -s | tr '[:upper:]' '[:lower:]')

ifeq ($(findstring os/390,$OSTYPE),os/390)
OSTYPE ?= os390
endif
endif
ARCHTYPE := $(shell uname -m | tr '[:upper:]' '[:lower:]')
COVTESTS ?= test-cov
COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js
GTEST_FILTER ?= "*"
Expand Down

0 comments on commit 9d29211

Please sign in to comment.