====== functions ====== [[https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html|8.3 Functions for File Names]] * $(**dir** /path/to/file.txt) - get path part only * $(**notdir** src/foo.c hacks) - result ''foo.c hacks''. * $(**suffix** ...) * $(**basename** src/foo.c src-1.0/bar hacks) - produces the result ''src/foo src-1.0/bar hacks''. * $(**addsuffix**) * $(**addprefix**) * $(**join**) * $(**wildcard**) - execute wildcard expansion (needed to expand wildcards in variables and arguments in functions). More: [[https://www.gnu.org/software/make/manual/html_node/Wildcard-Function.html|The Function wildcard]] * $(**realpath**) - NOTE: file must exist! * $(**abspath**) - NOTE: do not require file to exist [[https://www.gnu.org/software/make/manual/html_node/Conditional-Functions.html|Conditional Functions]] - can be used also in recipes body: * $(**if**)\\ Example 1: build: $(if $(filter 1,$(WORKSPACE_DETECTED)), \ @echo @echo "!!! Configured workspace detected: '$(WORKSPACE_PATH)'" ) Example 2: $(if $(filter foo,bar),@echo match is broken,@echo match works) $(if $(filter-out foo,bar),@echo match works,@echo match is broken)