From: Ian Jackson Date: Thu, 14 Nov 2019 19:40:59 +0000 (+0000) Subject: subdirmk: Go back to ^ and ~ X-Git-Tag: subdirmk/0.1~7 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=1e59a1940a98b26cb77913424f6da767646bcce4;hp=f5a41a874d98a44c36040aa74e6be685628baf70 subdirmk: Go back to ^ and ~ Signed-off-by: Ian Jackson --- diff --git a/example/Subdir.sd.mk b/example/Subdir.sd.mk index 162d7ce..5c2040a 100644 --- a/example/Subdir.sd.mk +++ b/example/Subdir.sd.mk @@ -3,7 +3,7 @@ # Copyright 2019 Ian Jackson # SPDX-License-Identifier: LGPL-2.0-or-later -INCLUDES += -I&;lib/ +INCLUDES += -I&^/lib/ include subdirmk/usual.mk include subdirmk/regen.mk diff --git a/example/lib/Subdir.sd.mk b/example/lib/Subdir.sd.mk index 8ac946d..c2939c5 100644 --- a/example/lib/Subdir.sd.mk +++ b/example/lib/Subdir.sd.mk @@ -10,4 +10,4 @@ &libtoy.a: $(&OBJECTS) $(AR) rc $@ $^ --include &,for-test.mk +-include &^/lib/for-test.mk diff --git a/generate b/generate index b4c52ae..f46747d 100755 --- a/generate +++ b/generate @@ -133,8 +133,8 @@ sub process_input_mk ($$$$$$$$) { my %pfxmap = ( '' => $dir_prefix, - ',' => "\$(top_srcdir)${dir_suffix}/", - ';' => "\$(top_srcdir)/", + '^' => "\$(top_srcdir)${dir_suffix}/", + '~' => "\$(top_srcdir)/", ); while (<$input>) { @@ -153,12 +153,12 @@ sub process_input_mk ($$$$$$$$) { $targets->{$t} //= [ ]; } elsif (m{^(?=$caps_re)}) { o $var_prefix } - elsif (s{^([,;]?)(?=$lc_re)}{}) { o $pfxmap{$1} } + elsif (s{^([~^]?)(?=$lc_re)}{}) { o $pfxmap{$1} } elsif (s{^_}{}) { o $var_prefix } elsif (s{^=_}{}) { o $var_prefix } - elsif (s{^([,;]?)/}{}) { o $pfxmap{$1} } + elsif (s{^([~^]?)/}{}) { o $pfxmap{$1} } elsif (s{^=/}{}) { o $dir_name } - elsif (s{^([,;]?)(?=[ \t])}{}) { + elsif (s{^([~^]?)(?=[ \t])}{}) { my $prefix = $pfxmap{$1} // die; my $after=''; if (m{([ \t])$esc}) { ($_,$after) = ($`, $1.$'); }