💾 Archived View for warpengineer.space › entries › my-notes-on-makefiles.gmi captured on 2024-07-08 at 23:35:18. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

-=-=-=-=-=-=-

Stuff I use most

Output Functions

Defines

Functions

$(shell ) - Run 'command' in a shell and return output

$(call var,arg,arg,...) - Call a function, var, with args.

call example call example: reverse = $(2) $(1) D = $(call reverse,a,b) # D will contain 'b a'

$(filter pat,text) - Filter 'text' by 'pat'

filter example filter example: D = a.h a.c b.h b.c CFiles = $(filter %.c,$(D)) # CFiles will contain 'a.c b.c' only

$(if ,,) - If 'cond' is non-empty string, do 'then'...

$(or arg,arg,...) - Return first non-empty arg or empty string

$(and arg,arg,...) - Return empty string or last non-empty arg

List Functions

Directory/Path/File Functions

Create/Append to File

More stuff