summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
61f8c15)
Incompatible change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
The assumption is that filenames are usually lowercase and
variables usually uppercase. Otherwise, use another syntax:
The assumption is that filenames are usually lowercase and
variables usually uppercase. Otherwise, use another syntax:
+&/ => sub/dir/ or nothing
+&. => sub/dir or .
+ (This implies that `&./' works roughly like `&/', although
+ it can produce a needless `./')
-&/ => sub/dir/ or nothing
-&=/ => sub/dir or .
&^lc => $(top_srcdir)/sub/dir/lc
&^/ => $(top_srcdir)/sub/dir/
&^lc => $(top_srcdir)/sub/dir/lc
&^/ => $(top_srcdir)/sub/dir/
+&^. => $(top_srcdir)/sub/dir
&~lc => $(top_srcdir)/lc
&~/ => $(top_srcdir)/
&~lc => $(top_srcdir)/lc
&~/ => $(top_srcdir)/
- = return subdir without delimiter (not allowed with `^' `~')
^ pathname of this subdirectory in source tree
~ pathname of top level of source tree
^ pathname of this subdirectory in source tree
~ pathname of top level of source tree
- / terminates the escape (needed if next is not lwsp or space)
+ / terminates the path escape } needed if next is
+ _ terminates the var escape } not lwsp or space)
+ . terminates path escape giving dir name (excluding /)
+ = terminates var escape giving only prefix part (rarely needed)
lwsp starts multi-word processing (see below)
So pathname syntax is a subset of:
lwsp starts multi-word processing (see below)
So pathname syntax is a subset of:
- '&' [ '^' | '~' ] [ lc | '/' ]
+ '&' [ '^' | '~' ] [ lc | '/' | '.' | '=' ]
&& => && for convenience in shell runes
\& => & general escaping mechanism
&& => && for convenience in shell runes
\& => & general escaping mechanism
+ my %srcdirmap = (
+ '^' => "\$(top_srcdir)${dir_suffix}",
+ '~' => "\$(top_srcdir)",
+ );
my %pfxmap = (
'' => $dir_prefix,
my %pfxmap = (
'' => $dir_prefix,
- '^' => "\$(top_srcdir)${dir_suffix}/",
- '~' => "\$(top_srcdir)/",
+ $pfxmap{$_} = $srcdirmap{$_}.'/' foreach keys %srcdirmap;
while (<$input>) {
if (s#^\s*$esc\:##) {
while (<$input>) {
if (s#^\s*$esc\:##) {
elsif (m{^(?=$caps_re)}) { o $var_prefix }
elsif (s{^([~^]?)(?=$lc_re)}{}) { o $pfxmap{$1} }
elsif (s{^_}{}) { o $var_prefix }
elsif (m{^(?=$caps_re)}) { o $var_prefix }
elsif (s{^([~^]?)(?=$lc_re)}{}) { o $pfxmap{$1} }
elsif (s{^_}{}) { o $var_prefix }
- elsif (s{^=_}{}) { o $var_prefix }
+ elsif (s{^=}{}) { o $var_prefix_name }
elsif (s{^([~^]?)/}{}) { o $pfxmap{$1} }
elsif (s{^([~^]?)/}{}) { o $pfxmap{$1} }
- elsif (s{^=/}{}) { o $dir_name }
+ elsif (s{^\.}{}) { o $dir_name }
+ elsif (s{^([~^])\.}{}) { o $srcdirmap{$1} }
elsif (s{^([~^]?)(?=[ \t])}{}) {
my $prefix = $pfxmap{$1} // die;
my $after='';
elsif (s{^([~^]?)(?=[ \t])}{}) {
my $prefix = $pfxmap{$1} // die;
my $after='';