]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add backwards compability with makefile variables
authorFred Sundvik <fsundvik@gmail.com>
Sun, 7 Aug 2016 15:54:12 +0000 (18:54 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Sat, 20 Aug 2016 00:56:25 +0000 (03:56 +0300)
Makefile

index a14642af6cdd2f1056331d87514c3243028da83a..cf0a12f69593264ed68fbeec806f9a9545b1c929 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,20 @@ $(info $(ROOT_DIR)/keyboards)
 # Only consider folders with makefiles, to prevent errors in case there are extra folders
 KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
 
+#Compability with the old make variables
+ifdef keyboard
+    KEYBOARD := $(keyboard)
+endif
+ifdef sub
+    SUBPROJECT := $(sub)
+endif
+ifdef subproject
+    SUBPROJECT := $(subproject)
+endif
+ifdef keymap
+    KEYMAP := $(keymap)
+endif
+
 $(info Keyboard: $(KEYBOARD))
 $(info Keymap: $(KEYMAP))
 $(info Subproject: $(SUBPROJECT))