summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-06-12 15:55:05 -0400
committerJack Humbert <jack.humb@gmail.com>2016-06-12 15:55:05 -0400
commit92759be3226c83087959015be097b66d8c7e2f21 (patch)
tree0d11a94f037fc28237bbca06e99462da8a26869c /Makefile
parent42b40e6fde2a6c3a86fb151264cf426e5ad89d46 (diff)
downloadqmk_firmware-92759be3226c83087959015be097b66d8c7e2f21.tar.gz
qmk_firmware-92759be3226c83087959015be097b66d8c7e2f21.zip
change to relative paths instead of absolute
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 024a57134b..f8c945045c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,19 +4,22 @@ endif
starting_makefile := $(abspath $(firstword $(MAKEFILE_LIST)))
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
-tmk_root := $(patsubst %/,%,$(dir $(mkfile_path)))
+abs_tmk_root := $(patsubst %/,%,$(dir $(mkfile_path)))
ifneq (,$(findstring /keyboard/,$(starting_makefile)))
- possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(tmk_root)/keyboard/%,%,$(starting_makefile))))
+ possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(abs_tmk_root)/keyboard/%,%,$(starting_makefile))))
ifneq (,$(findstring /keymaps/,$(possible_keyboard)))
KEYBOARD_DIR:=$(firstword $(subst /keymaps/, ,$(possible_keyboard)))
KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard)))
+ tmk_root = ../../../..
else
KEYBOARD_DIR:=$(possible_keyboard)
KEYMAP_DIR:=default
+ tmk_root = ../..
endif
+else
+ tmk_root = .
endif
-
# $(info $(KEYBOARD_DIR))
# $(info $(KEYMAP_DIR))