浏览代码

Add backwards compability with makefile variables

Fred Sundvik 9 年之前
父节点
当前提交
459ddaceda
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      Makefile

+ 14 - 0
Makefile

@@ -42,6 +42,20 @@ $(info $(ROOT_DIR)/keyboards)
 # Only consider folders with makefiles, to prevent errors in case there are extra folders
 # Only consider folders with makefiles, to prevent errors in case there are extra folders
 KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
 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 Keyboard: $(KEYBOARD))
 $(info Keymap: $(KEYMAP))
 $(info Keymap: $(KEYMAP))
 $(info Subproject: $(SUBPROJECT))
 $(info Subproject: $(SUBPROJECT))