chiark / gitweb /
README: v2: Draft - macro assistance facility
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Dec 2019 16:22:57 +0000 (16:22 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 11 Dec 2019 13:33:33 +0000 (13:33 +0000)
Not implemented yet.  Also no S-o-b at this time!

README

diff --git a/README b/README
index e87cb8078238452cb4b70d283656ffbf7f6d5d4c..6dd1a05a97e3f7aec6a5f6af7e668b20636001f2 100644 (file)
--- 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
 --------------------------------