@ -632,17 +632,34 @@ all-keyboards-defaults-%:
all-keyboards-defaults : all -keyboards -defaults -all
all-keyboards-defaults : all -keyboards -defaults -all
KEYBOARDS := $( SUBDIRS:$( TOP_DIR) /keyboard/%/= /keyboard/%)
KEYBOARDS := $( SUBDIRS:$( TOP_DIR) /keyboard/%/= /keyboard/%)
all-keyboards-% : $( KEYBOARDS )
all-keyboards-all : $( addsuffix -all ,$ ( KEYBOARDS ) )
/keyboard/% :
all-keyboards-quick : $( addsuffix -quick ,$ ( KEYBOARDS ) )
$( eval KEYBOARD = $( patsubst /keyboard/%,%,$@ ) )
all-keyboards-clean : $( addsuffix -clean ,$ ( KEYBOARDS ) )
$( eval KEYMAPS = $( notdir $( patsubst %/.,%,$( wildcard $( TOP_DIR) $@ /keymaps/*/.) ) ) )
@for x in $( KEYMAPS) ; do \
printf " Compiling $( BOLD) $( KEYBOARD) $( NO_COLOR) with $( BOLD) $$ x $( NO_COLOR) " | $( AWK) '{ printf "%-88s", $$0; }' ; \
LOG = $$ ( $( MAKE) -C $( TOP_DIR) $@ $( subst all-keyboards-,,$@ ) keymap = $$ x VERBOSE = $( VERBOSE) COLOR = $( COLOR) SILENT = true 2>& 1) ; if [ $$ ? -gt 0 ] ; then $( PRINT_ERROR_PLAIN) ; elif [ " $$ LOG " != "" ] ; then $( PRINT_WARNING_PLAIN) ; else $( PRINT_OK) ; fi ; \
done
all-keyboards : all -keyboards -all
all-keyboards : all -keyboards -all
d e f i n e m a k e _ k e y b o a r d
$( eval KEYBOARD =$ ( patsubst /keyboard /%,%,$ 1) )
$( eval KEYMAPS =$ ( notdir $ ( patsubst %/.,%,$ ( wildcard $ ( TOP_DIR ) $ 1/keymaps /*/.) ) ) )
@ f o r x i n $( KEYMAPS ) ; d o \
printf " Compiling $( BOLD) $( KEYBOARD) $( NO_COLOR) with $( BOLD) $$ x $( NO_COLOR) " | $( AWK) '{ printf "%-88s", $$0; }' ; \
LOG = $$ ( $( MAKE) -C $( TOP_DIR) $1 $2 keymap = $$ x VERBOSE = $( VERBOSE) COLOR = $( COLOR) SILENT = true 2>& 1) ; if [ $$ ? -gt 0 ] ; then $( PRINT_ERROR_PLAIN) ; elif [ " $$ LOG " != "" ] ; then $( PRINT_WARNING_PLAIN) ; else $( PRINT_OK) ; fi ; \
d o n e
e n d e f
d e f i n e m a k e _ k e y b o a r d _ h e l p e r
# Just remove the -quick, -all and so on from the first argument and pass it forward
$( call make_keyboard ,$ ( subst -$ 2,,$ 1) ,$ 2)
e n d e f
/keyboard/%-quick :
$( call make_keyboard_helper,$@ ,quick)
/keyboard/%-all :
$( call make_keyboard_helper,$@ ,all)
/keyboard/%-clean :
$( call make_keyboard_helper,$@ ,clean)
/keyboard/% :
$( call make_keyboard_helper,$@ ,all)
all-keymaps-% :
all-keymaps-% :
$( eval MAKECONFIG = $( call get_target,all-keymaps,$@ ) )
$( eval MAKECONFIG = $( call get_target,all-keymaps,$@ ) )
$( eval KEYMAPS = $( notdir $( patsubst %/.,%,$( wildcard $( TOP_DIR) /keyboard/$( KEYBOARD) /keymaps/*/.) ) ) )
$( eval KEYMAPS = $( notdir $( patsubst %/.,%,$( wildcard $( TOP_DIR) /keyboard/$( KEYBOARD) /keymaps/*/.) ) ) )