From: Ian Jackson Date: Sun, 26 Jan 2020 12:37:14 +0000 (+0000) Subject: syntax: Support &: literal (for make `grouped' multiple targets) X-Git-Tag: subdirmk/0.4~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=8a588ad0cc1d3e2944bb29fb3ce19ac2d0dbdcc4;p=subdirmk.git syntax: Support &: literal (for make `grouped' multiple targets) Very recent versions of GNU make support this syntax: foo bar biz &: baz boz echo $^ > foo echo $^ > bar echo $^ > biz (See (make)Multiple Targets, subheading `Rules with Grouped Targets') This use of & is nonoverlapping with everything we care about, so we can just pass it straight through. Passing through &: means we pass through &:: too. Signed-off-by: Ian Jackson --- diff --git a/README b/README index 70708cd..bea3c1b 100644 --- a/README +++ b/README @@ -130,6 +130,10 @@ So pathname syntax is a subset of: &: .... recognised at start of line only (possibly after lwsp) +&: => &: + for make multiple targets syntax + recognised anywhere *except* start of line + &:include filename filename should usually be [&]foo.sd.mk &:-include filename tolerate nonexistent file RHS is &-expanded but filenames are relative to the top diff --git a/generate b/generate index b682299..b65ba1d 100755 --- a/generate +++ b/generate @@ -350,6 +350,7 @@ sub process_input_mk ($$$$) { next; } if (s{^\\$esc}{}) { od "$$esclitr" } + elsif (s{^:}{}) { od "$$esclitr:" } elsif (s{^\\\$}{}) { oud '$' } elsif (s{^\\\s+$}{}) { } elsif (s{^$esc}{}) { od "$$esclitr$$esclitr" }