From: Ian Jackson Date: Mon, 9 Dec 2019 16:22:57 +0000 (+0000) Subject: README: v2: Draft - macro assistance facility X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=a3f7f478a745a0bd288aa272f6dd0e38cfeee5a5;p=subdirmk.git README: v2: Draft - macro assistance facility Not implemented yet. Also no S-o-b at this time! --- diff --git a/README b/README index e87cb80..6dd1a05 100644 --- a/README +++ b/README @@ -322,6 +322,32 @@ So pathname syntax is a subset of: `all' is extra special: every directory has an `all' target, which corresponds to &TARGETS. +DRAFT - MACRO ASSISTANCE FACILITY +--------------------------------- + +Thanks to Mark Wooding. + + &:macro NAME + STUFF + &:endm + +expands to + + define %NAME + STUFF (with `$'s doubled except before a digit) + endef + NAME = $(eval $(call %NAME,$1,$2,$3,$4,$5,$6,$7,$8,$9)) + +and + + &(NAME ARG,ARG,...) + +expands to + + $(call NAME,ARG,ARG,...) + +with `$'s doubled. + Subdirectory and variable naming --------------------------------