blob: 4c08fe4b7c6d42bd56e88ca8b0ae8ace72baea13 [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
25# General debugging rule, use 'make print-XXX' to print the
26# definition, value and origin of XXX.
27print-%:
28 $(error PRINT: $(value $*) = "$($*)" (from $(origin $*)))
29