Skip to content

Commit 7a1d726

Browse files
committed
mk: Add a printer helper to the make setup
Also add docs because not being able to discover these things is the pits.
1 parent c897ac0 commit 7a1d726

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Makefile.in

+7
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@
159159
#
160160
# Admittedly this is a little convoluted.
161161
#
162+
# If you find yourself working on the make infrastructure itself, and trying to
163+
# find the value of a given variable after expansion, you can use:
164+
#
165+
# make print-VARIABLE_NAME
166+
#
167+
# To extract it
168+
#
162169
# </nitty-gritty>
163170
#
164171

mk/util.mk

+3
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ else
1616
E = echo $(1)
1717
endif
1818

19+
print-%:
20+
@echo $*=$($*)
21+
1922
S := $(CFG_SRC_DIR)

0 commit comments

Comments
 (0)