50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
# QMK for TencentOS
|
|
# @author Jimmin.huang jimmin@163.com
|
|
# Makefile template
|
|
# aim for debug makefile
|
|
########################################################################
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(MAKELEVEL),0)
|
|
|
|
|
|
# Standard definitions for true and false. true is any non-empty
|
|
# string, false is an empty string. These are intended for use with
|
|
# $(if).
|
|
|
|
true := T
|
|
false :=
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Function: not
|
|
# Arguments: 1: A boolean value
|
|
# Returns: Returns the opposite of the arg. (true -> false, false -> true)
|
|
# ----------------------------------------------------------------------------
|
|
not = $(if $1,$(false),$(true))
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Function: seq
|
|
# Arguments: 1: A string to compare against...
|
|
# 2: ...this string
|
|
# Returns: Returns $(true) if the two strings are identical
|
|
# ----------------------------------------------------------------------------
|
|
seq = $(if $(filter-out xx,x$(subst $1,,$2)$(subst $2,,$1)x),$(false),$(true))
|
|
|
|
ifeq (dm,$(findstring dm,$(MAKECMDGOALS)))
|
|
$(info ###################All pre-defined and user-defined variable's Key:)
|
|
$(info $(shell echo -e '\e[1;33m $(sort $(.VARIABLES)) \e[m'))
|
|
|
|
$(info ###################All user-defined Variables:)
|
|
$(foreach v, $(sort $(.VARIABLES)),$(if $(call seq,$(origin ${v}),file), $(eval VV:=$(value ${v})) $(info $(shell echo -e '\e[1;33m ${v} \e[m = "$(VV)"' ))))
|
|
dm:
|
|
@true
|
|
endif
|
|
|
|
|
|
|
|
PHONY: dm
|
|
|
|
endif |