use make abspath intead of shell realpath
This commit is contained in:
parent
e92583ffd7
commit
9a8a9359e4
|
@ -27,6 +27,7 @@ jobs:
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
build-arm:
|
build-arm:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, macos-latest]
|
os: [windows-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
11
tools/top.mk
11
tools/top.mk
|
@ -26,20 +26,21 @@ THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
||||||
|
|
||||||
# strip off /tools/top.mk to get for example ../../..
|
# strip off /tools/top.mk to get for example ../../..
|
||||||
TOP := $(patsubst %/tools/top.mk,%,$(THIS_MAKEFILE))
|
TOP := $(patsubst %/tools/top.mk,%,$(THIS_MAKEFILE))
|
||||||
#$(info top.mk: Initial TOP=$(TOP))
|
$(info top.mk: Initial TOP=$(TOP))
|
||||||
|
|
||||||
# Set TOP to an absolute path, for example /tinyUSB (from ../../..)
|
# Set TOP to an absolute path, for example /tinyUSB (from ../../..)
|
||||||
ifeq ($(CMDEXE),1)
|
ifeq ($(CMDEXE),1)
|
||||||
TOP := $(subst \,/,$(shell for %%i in ( $(TOP) ) do echo %%~fi))
|
TOP := $(subst \,/,$(shell for %%i in ( $(TOP) ) do echo %%~fi))
|
||||||
else
|
else
|
||||||
TOP := $(shell realpath $(TOP))
|
TOP := $(abspath $(TOP))
|
||||||
endif
|
endif
|
||||||
#$(info top.mk: Top directory is $(TOP))
|
|
||||||
|
$(info top.mk: Top directory is $(TOP))
|
||||||
|
|
||||||
# Set CURRENT_PATH to the relative path from TOP to the current directory, ie examples/device/cdc_msc_freertos
|
# Set CURRENT_PATH to the relative path from TOP to the current directory, ie examples/device/cdc_msc_freertos
|
||||||
ifeq ($(CMDEXE),1)
|
ifeq ($(CMDEXE),1)
|
||||||
CURRENT_PATH := $(subst $(TOP)/,,$(subst \,/,$(shell echo %CD%)))
|
CURRENT_PATH := $(subst $(TOP)/,,$(subst \,/,$(shell echo %CD%)))
|
||||||
else
|
else
|
||||||
CURRENT_PATH := $(shell realpath --relative-to=$(TOP) `pwd`)
|
CURRENT_PATH = $(subst $(TOP)/,,$(abspath .))
|
||||||
endif
|
endif
|
||||||
#$(info top.mk: Path from top is $(CURRENT_PATH))
|
$(info top.mk: CURRENT_PATH = $(CURRENT_PATH))
|
||||||
|
|
Loading…
Reference in New Issue