From a3f7f478a745a0bd288aa272f6dd0e38cfeee5a5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2019 16:22:57 +0000 Subject: [PATCH] README: v2: Draft - macro assistance facility Not implemented yet. Also no S-o-b at this time! --- README | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 -------------------------------- -- 2.30.2