# subdirmk - &-filter (makefile generation program)
# Copyright 2019 Ian Jackson
# SPDX-License-Identifier: LGPL-2.0-or-later
+# There is NO WARRANTY.
#
# $(srcdir)/subdirmk/generate [--srcdir=SRCDIR] [--] SUBDIR...
#
sub err ($) {
my ($m) = @_;
- die "subdirmk: ${err_file}:$.: $m\n";
+ die defined $err_file
+ ? "subdirmk: ${err_file}:$.: $m\n"
+ : "subdirmk: $m\n";
}
sub wrncore ($$) {
$note_varref->($2,!!$1) if m{^($esc)?([^()\$]+\))};
}
elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\${$1}"; }
- elsif (s{^\$\{}{}) {
+ elsif (s{^\{}{}) {
err 'macro invocation cannot be re-$-doubled' if $ddbl;
od '${eval ${call ';
$evalcall_brackets = 1;
- $push_nest->('eval',1, '&${...}');
+ $push_nest->('eval',1, '&{...}');
$note_varref->($2,!!$1) if m{^\s*($esc)?([^,{}\$]+)};
} elsif (s{^([~^]?)(?=[ \t])}{}) {
my $prefix = $pfxmap{$1} // die "internal error ($1?)";