diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-06-12 15:55:05 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-06-12 15:55:05 -0400 |
| commit | 92759be3226c83087959015be097b66d8c7e2f21 (patch) | |
| tree | 0d11a94f037fc28237bbca06e99462da8a26869c | |
| parent | 42b40e6fde2a6c3a86fb151264cf426e5ad89d46 (diff) | |
| download | qmk_firmware-92759be3226c83087959015be097b66d8c7e2f21.tar.gz qmk_firmware-92759be3226c83087959015be097b66d8c7e2f21.zip | |
change to relative paths instead of absolute
| -rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -4,19 +4,22 @@ endif | |||
| 4 | 4 | ||
| 5 | starting_makefile := $(abspath $(firstword $(MAKEFILE_LIST))) | 5 | starting_makefile := $(abspath $(firstword $(MAKEFILE_LIST))) |
| 6 | mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | 6 | mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) |
| 7 | tmk_root := $(patsubst %/,%,$(dir $(mkfile_path))) | 7 | abs_tmk_root := $(patsubst %/,%,$(dir $(mkfile_path))) |
| 8 | 8 | ||
| 9 | ifneq (,$(findstring /keyboard/,$(starting_makefile))) | 9 | ifneq (,$(findstring /keyboard/,$(starting_makefile))) |
| 10 | possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(tmk_root)/keyboard/%,%,$(starting_makefile)))) | 10 | possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(abs_tmk_root)/keyboard/%,%,$(starting_makefile)))) |
| 11 | ifneq (,$(findstring /keymaps/,$(possible_keyboard))) | 11 | ifneq (,$(findstring /keymaps/,$(possible_keyboard))) |
| 12 | KEYBOARD_DIR:=$(firstword $(subst /keymaps/, ,$(possible_keyboard))) | 12 | KEYBOARD_DIR:=$(firstword $(subst /keymaps/, ,$(possible_keyboard))) |
| 13 | KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard))) | 13 | KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard))) |
| 14 | tmk_root = ../../../.. | ||
| 14 | else | 15 | else |
| 15 | KEYBOARD_DIR:=$(possible_keyboard) | 16 | KEYBOARD_DIR:=$(possible_keyboard) |
| 16 | KEYMAP_DIR:=default | 17 | KEYMAP_DIR:=default |
| 18 | tmk_root = ../.. | ||
| 17 | endif | 19 | endif |
| 20 | else | ||
| 21 | tmk_root = . | ||
| 18 | endif | 22 | endif |
| 19 | |||
| 20 | # $(info $(KEYBOARD_DIR)) | 23 | # $(info $(KEYBOARD_DIR)) |
| 21 | # $(info $(KEYMAP_DIR)) | 24 | # $(info $(KEYMAP_DIR)) |
| 22 | 25 | ||
