diff options
| author | kkitayam <[email protected]> | 2021-01-14 01:19:43 +0900 |
|---|---|---|
| committer | kkitayam <[email protected]> | 2021-01-14 01:19:43 +0900 |
| commit | d7cfd8b91db127459d61aa8b8d091cb08e732208 (patch) | |
| tree | 32b428648fcbdaadb1ade3269f6a2b5c76e8dee7 /tools | |
| parent | fc69dd70cf3c669308240bb0a6bb05d6eda51487 (diff) | |
replaced variable name to CMDEXE from UNAME.
removed the rule that .d files are converted to .P files.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/top.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/top.mk b/tools/top.mk index d276f5814..84523a557 100644 --- a/tools/top.mk +++ b/tools/top.mk @@ -2,10 +2,10 @@ ifneq ($(lastword a b),b) $(error This Makefile require make 3.81 or newer) endif -# Detect windows or not +# Detect whether shell style is windows or not # https://stackoverflow.com/questions/714100/os-detecting-makefile/52062069#52062069 ifeq '$(findstring ;,$(PATH))' ';' -UNAME := Windows +CMDEXE := 1 endif # Set TOP to be the path to get from the current directory (where make was @@ -15,14 +15,14 @@ endif THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST)) TOP := $(patsubst %/tools/top.mk,%,$(THIS_MAKEFILE)) -ifeq ($(UNAME),Windows) +ifeq ($(CMDEXE),1) TOP := $(subst \,/,$(shell for %%i in ( $(TOP) ) do echo %%~fi)) else TOP := $(shell realpath $(TOP)) endif #$(info Top directory is $(TOP)) -ifeq ($(UNAME),Windows) +ifeq ($(CMDEXE),1) CURRENT_PATH := $(subst $(TOP)/,,$(subst \,/,$(shell echo %CD%))) else CURRENT_PATH := $(shell realpath --relative-to=$(TOP) `pwd`) |
