Skip to content

Commit 27ebacb

Browse files
committed
merging lets_split
2 parents c1037b1 + 3b990c0 commit 27ebacb

File tree

54 files changed

+2361
-445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2361
-445
lines changed

Makefile

+39-18
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ERROR_FILE := $(BUILD_DIR)/error_occured
3838

3939
MAKEFILE_INCLUDED=yes
4040

41-
# Helper function to process the newt element of a space separated path
41+
# Helper function to process the newt element of a space separated path
4242
# It works a bit like the traditional functional head tail
4343
# so the CURRENT_PATH_ELEMENT will beome the new head
4444
# and the PATH_ELEMENTS are the rest that are still unprocessed
@@ -47,16 +47,16 @@ define NEXT_PATH_ELEMENT
4747
$$(eval PATH_ELEMENTS := $$(wordlist 2,9999,$$(PATH_ELEMENTS)))
4848
endef
4949

50-
# We change the / to spaces so that we more easily can work with the elements
50+
# We change the / to spaces so that we more easily can work with the elements
5151
# separately
5252
PATH_ELEMENTS := $(subst /, ,$(STARTING_DIR))
5353
# Initialize the path elements list for further processing
5454
$(eval $(call NEXT_PATH_ELEMENT))
5555

56-
# This function sets the KEYBOARD; KEYMAP and SUBPROJECT to the correct
56+
# This function sets the KEYBOARD; KEYMAP and SUBPROJECT to the correct
5757
# variables depending on which directory you stand in.
58-
# It's really a very simple if else chain, if you squint enough,
59-
# but the makefile syntax makes it very verbose.
58+
# It's really a very simple if else chain, if you squint enough,
59+
# but the makefile syntax makes it very verbose.
6060
# If we are in a subfolder of keyboards
6161
ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
6262
$(eval $(call NEXT_PATH_ELEMENT))
@@ -111,7 +111,7 @@ endif
111111
.DEFAULT_GOAL := all
112112
ifneq ($(KEYMAP),)
113113
ifeq ($(SUBPROJECT),)
114-
# Inside a keymap folder, just build the keymap, with the
114+
# Inside a keymap folder, just build the keymap, with the
115115
# default subproject
116116
.DEFAULT_GOAL := $(KEYBOARD)-$(KEYMAP)
117117
else
@@ -163,18 +163,18 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3
163163
ifneq ($1,)
164164
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,$$(firstword $1)),true)
165165
MATCHED_ITEM := $$(firstword $1)
166-
else
166+
else
167167
$$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$$(wordlist 2,9999,$1)))
168168
endif
169169
endif
170170
endef
171171

172172
# A recursive helper function for finding the longest match
173173
# $1 The list to be checed
174-
# It works by always removing the currently matched item from the list
174+
# It works by always removing the currently matched item from the list
175175
# and call itself recursively, until a match is found
176176
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
177-
# Stop the recursion when the list is empty
177+
# Stop the recursion when the list is empty
178178
ifneq ($1,)
179179
RULE_BEFORE := $$(RULE)
180180
$$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1))
@@ -270,7 +270,7 @@ define PARSE_KEYBOARD
270270
$$(eval $$(call PARSE_SUBPROJECT,$$(SUBPROJECT)))
271271
# If there's no matching subproject, we assume it's the default
272272
# This will allow you to leave the subproject part of the target out
273-
else
273+
else
274274
$$(eval $$(call PARSE_SUBPROJECT,))
275275
endif
276276
endef
@@ -285,7 +285,7 @@ endef
285285
# When entering this, the keyboard and subproject are known, so now we need
286286
# to determine which keymaps are going to get compiled
287287
define PARSE_SUBPROJECT
288-
# If we want to compile the default subproject, then we need to
288+
# If we want to compile the default subproject, then we need to
289289
# include the correct makefile to determine the actual name of it
290290
CURRENT_SP := $1
291291
ifeq ($$(CURRENT_SP),)
@@ -304,7 +304,7 @@ define PARSE_SUBPROJECT
304304
endif
305305
endif
306306
# The special allsp is handled later
307-
ifneq ($$(CURRENT_SP),allsp)
307+
ifneq ($$(CURRENT_SP),allsp)
308308
# get a list of all keymaps
309309
KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.)))
310310
ifneq ($$(CURRENT_SP),)
@@ -343,7 +343,7 @@ define PARSE_SUBPROJECT
343343
endif
344344
endef
345345

346-
# If we want to parse all subprojects, but the keyboard doesn't have any,
346+
# If we want to parse all subprojects, but the keyboard doesn't have any,
347347
# then use defaultsp instead
348348
define PARSE_ALL_SUBPROJECTS
349349
ifeq ($$(SUBPROJECTS),)
@@ -448,7 +448,7 @@ endef
448448

449449

450450
# Set the silent mode depending on if we are trying to compile multiple keyboards or not
451-
# By default it's on in that case, but it can be overriden by specifying silent=false
451+
# By default it's on in that case, but it can be overriden by specifying silent=false
452452
# from the command line
453453
define SET_SILENT_MODE
454454
ifdef SUB_IS_SILENT
@@ -481,11 +481,12 @@ endef
481481
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
482482
SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
483483
.PHONY: $(SUBPROJECTS)
484-
$(SUBPROJECTS): %: %-allkm
484+
$(SUBPROJECTS): %: %-allkm
485485

486486
# Let's match everything, we handle all the rule parsing ourselves
487487
.PHONY: %
488-
%:
488+
ifndef SKIP_GIT
489+
%:
489490
# Check if we have the CMP tool installed
490491
cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
491492
# Check if the submodules are dirty, and display a warning if they are
@@ -505,8 +506,24 @@ $(SUBPROJECTS): %: %-allkm
505506
# But we return the error code at the end, to trigger travis failures
506507
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
507508
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
508-
$(foreach TEST,$(TESTS),$(RUN_TEST))
509+
$(foreach TEST,$(TESTS),$(RUN_TEST))
510+
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
511+
else
512+
%:
513+
# Check if we have the CMP tool installed
514+
cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
515+
rm -f $(ERROR_FILE) > /dev/null 2>&1
516+
$(eval $(call PARSE_RULE,$@))
517+
$(eval $(call SET_SILENT_MODE))
518+
# Run all the commands in the same shell, notice the + at the first line
519+
# it has to be there to allow parallel execution of the submake
520+
# This always tries to compile everything, even if error occurs in the middle
521+
# But we return the error code at the end, to trigger travis failures
522+
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
523+
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
524+
$(foreach TEST,$(TESTS),$(RUN_TEST))
509525
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
526+
endif
510527

511528
# All should compile everything
512529
.PHONY: all
@@ -526,7 +543,11 @@ test: test-all
526543
test-clean: test-all-clean
527544

528545
# Generate the version.h file
529-
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
546+
ifndef SKIP_GIT
547+
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
548+
else
549+
GIT_VERSION := NA
550+
endif
530551
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
531552
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
532553
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Dvorak support, plover support, gaming support
2+
3+
I'm used to the Kinesis, so originally I was just going to patch up
4+
the thumb keys to be more familiar. But the ergodox is really well
5+
suited to NKRO support in Plover, so I added a layer for that, and
6+
then I remembered that dvorak can be really annoying for video
7+
games (try to reach WASD), so I added a layer for that.
8+
9+
The result is probably a bit idiosyncratic, but it works for me.
10+
11+
(I also don't have any press/hold distinction keys, because that
12+
confuses my fuzzy little brain.)
13+
14+
Contributed by seebs (seebs@seebs.net)

0 commit comments

Comments
 (0)