Skip to content

Commit

Permalink
Merge pull request #1745 from Pinata-Consulting/makefile-print-variab…
Browse files Browse the repository at this point in the history
…le-utility

Makefile: add print-FOO utility target that prints the value of a make variable
  • Loading branch information
jerryz123 authored Jan 19, 2024
2 parents c7e33e9 + 22ceb74 commit a152d40
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -469,3 +469,10 @@ check-submodule-status:
# Disable all suffix rules to improve Make performance on systems running older
# versions of Make
.SUFFIXES:

.PHONY: print-%
# Print any variable and it's origin. This helps figure out where the
# variable was defined and to distinguish between empty and undefined.
print-%:
@echo "$*=$($*)"
@echo "Origin is: $(origin $*)"

0 comments on commit a152d40

Please sign in to comment.