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 <ijackson@chiark.greenend.org.uk>
Syntax: Incompatible change: &$( does not do daft { thing It is silly for &$( to expand to ${. That requires the input to contain non-matched kinds of brackets. The shell compatibility is not needed. In a shell rune, you can write &\$thing since the { } are not normally needed there at all. If they are then now &\${thing} is necessary. It would be possible to steal "&${" (or allow only "&$(") but that seems less good. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: Provide convenience syntax &( for $(eval Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: Incompatible change: Use &{ not &${ for macros This will be more orthogonal with $( which will come in a moment. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Legal: Add NO WARRANTY everywhere Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
generate: Avoid $err_file undefined warning during startup If, for example, one of the input files implied by the command line arguments is missing, err is called with $err_file not yet set. Handle this case. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
generate: Mention suppressions when warning re VAR vs &VAR When we are actually printing the warning, report all the locations, including the suppressed ones. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: Support &:local+global !... Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: Rescope effect of &:local+global Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: Expand &$( and &$NN to use ${ } rather than $( ) And now document the use of $&+ for recipes. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: Use ${top_srcdir} rather than $(top_srcdir) Again, this makes it possible to use in $-doubled shell runes as well as in make syntax. (Assuming you have made top_srcdir be a shell variable as well as a make variable.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Syntax: expand &$... to ${....} rather than $(....) This makes it possible to use in $-doubled shell runes as well as in make syntax. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warnings: Introduce new `broken-var-ref' warning Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warning reporting: Report each warning only once In particular, Prefix and Suffix, or conventional &:include's can generate a lot of repeated warnings. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warning reporting: Provide &:local+global directive Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warning reporting: Warning suppression system Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warnings: Sort occurrences properly in local+global warnings Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warnings: Warn for confusing single-char $ expansions Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warnings: Track variable references in &-expansions For &-escapes which match the whole variable name, we can conveniently track variable expansions as part of the processing. (We don't change any of the matching regexps.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Warnings: Track basic $-references We must always stop at $'s in the input now. Having stopped at $, we normally just output it and carry on. Ie, we only stop so we can do some inspection: as before, we do this variable tracking as inspection before processing, rather entangled with processing. We can deal reasonably properly with ${ } and $( ). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>