blob: 4f65790845ef5d3b427dc3141138e6786386b51f [file] [log] [blame]
Daniel Dunbarb3a69012009-06-26 16:47:03 +00001# Makefile utilities
2
3###
4# Utility functions
5
6# Function: Set variable value
7#
8# Set the given make variable to the given value.
9Set = $(eval $(1) := $(2))
10
11# Function: Append variable value
12#
13# Append the given value to the given make variable.
14Append = $(eval $(1) += $(2))
15
16###
17# Clean up make behavior
18
19# Cancel all suffix rules. We don't want no stinking suffix rules.
20.SUFFIXES:
21
22###
23# Debugging
24
Daniel Dunbar557a6ea2010-01-13 16:13:01 +000025# General debugging rule, use 'make print-XXX' to print the definition, value
26# and origin of XXX.
27make-print-%:
Daniel Dunbarb3a69012009-06-26 16:47:03 +000028 $(error PRINT: $(value $*) = "$($*)" (from $(origin $*)))
29