Skip to content

Instantly share code, notes, and snippets.

@micklove
Created February 27, 2020 02:43
Show Gist options
  • Save micklove/171ef7e7e6cf54bc11dbc341274f3dc9 to your computer and use it in GitHub Desktop.
Save micklove/171ef7e7e6cf54bc11dbc341274f3dc9 to your computer and use it in GitHub Desktop.
# apologies, forgotten the book I got this from... but very useful :O
# see origin function at https://www.gnu.org/software/make/manual/html_node/Origin-Function.html
dump-var-origin: ## useful for debugging
@$(foreach V,$(sort $(.VARIABLES)), \
$(if $(filter-out environ% default automatic, \
$(origin $V)), $(info $V=$($V) ($(value $V)))))
# Usage - make dump-var-origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment