From 1e59a1940a98b26cb77913424f6da767646bcce4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 14 Nov 2019 19:40:59 +0000 Subject: [PATCH] subdirmk: Go back to ^ and ~ Signed-off-by: Ian Jackson --- example/Subdir.sd.mk | 2 +- example/lib/Subdir.sd.mk | 2 +- generate | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) 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.$'); } -- 2.30.2