X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=README;h=20658ae2adc3087e1f24db87cababc19aaa154b9;hb=143bb5d7dfa60aa0549d934a2e9356961d97895a;hp=130a1c7fbfc085dc9d2b5b8cf65a7d1b7f9c506b;hpb=3177fb7abb48479332cce56b02b6407968fb2d27;p=subdirmk.git diff --git a/README b/README index 130a1c7..20658ae 100644 --- a/README +++ b/README @@ -340,6 +340,19 @@ STUFF $ THINGS .. STUFF $$ THINGS &:endm .. endef NAME is processed for & +&${..$..} => ${eval ${call ..$$..}} + (matches { } pairs to find the end) + content is $-doubled (unless it contains $- to turn that off) + + Together &:macro and &${...} provide a more reasonable macro + facility than raw make. They solve the problem that make + expansions cannot directly generate multiple rules, variable, + etc.; instead, `$(eval )' must be used, but that re-expands + the argument, meaning that all the literal text must be + $-doubled. This applies to the macro text and to the + arguments. Also `$(eval $(call ...))' is an unfortunate syntax. + Hence &:macro and &${...}. + While dollar-doubling: - - - - - - - - - - -