From c5e7d25834b006913962da9251ab4330fe3961fc 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 --- mtest/Subdir.sd.mk | 6 +++--- stest/Subdir.sd.mk | 2 +- subdirmk/example/Subdir.sd.mk | 2 +- subdirmk/example/lib/Subdir.sd.mk | 2 +- subdirmk/generate | 10 +++++----- test-common.sd.mk | 4 ++-- test-example/Subdir.sd.mk | 6 +++--- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mtest/Subdir.sd.mk b/mtest/Subdir.sd.mk index 7c9953e..bdb872f 100644 --- a/mtest/Subdir.sd.mk +++ b/mtest/Subdir.sd.mk @@ -1,7 +1,7 @@ -&DEPS += $; make-secnet-sites -&DEPS += $; ipaddrset.py -&DEPS += &, common.tcl +&DEPS += &~/make-secnet-sites +&DEPS += &~/ipaddrset.py +&DEPS += &^/common.tcl &:include test-common.sd.mk diff --git a/stest/Subdir.sd.mk b/stest/Subdir.sd.mk index 6eb3209..9b953ad 100644 --- a/stest/Subdir.sd.mk +++ b/stest/Subdir.sd.mk @@ -2,7 +2,7 @@ &TARGETS += & udp-preload.so &DEPS += & udp-preload.so -&DEPS += &, common.tcl +&DEPS += &^ common.tcl &DEPS += secnet &DEPS += test-example/sites.conf &DEPS += test-example/inside.key diff --git a/subdirmk/example/Subdir.sd.mk b/subdirmk/example/Subdir.sd.mk index 162d7ce..5c2040a 100644 --- a/subdirmk/example/Subdir.sd.mk +++ b/subdirmk/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/subdirmk/example/lib/Subdir.sd.mk b/subdirmk/example/lib/Subdir.sd.mk index 8ac946d..c2939c5 100644 --- a/subdirmk/example/lib/Subdir.sd.mk +++ b/subdirmk/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/subdirmk/generate b/subdirmk/generate index b4c52ae..f46747d 100755 --- a/subdirmk/generate +++ b/subdirmk/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.$'); } diff --git a/test-common.sd.mk b/test-common.sd.mk index b830264..0584a98 100644 --- a/test-common.sd.mk +++ b/test-common.sd.mk @@ -1,7 +1,7 @@ include common.make -&TESTSCRIPTS ?= $(shell echo &,t-*[0-9a-z]) +&TESTSCRIPTS ?= $(shell echo &^/t-*[0-9a-z]) &TESTNAMES := $(patsubst t-%,%,$(notdir $(&TESTSCRIPTS))) &DEPS += $(src)/test-common.tcl @@ -15,7 +15,7 @@ include common.make CHECK_SILENT ?= @ -&d-%/ok: &,t-% $(&DEPS) +&d-%/ok: &^/t-% $(&DEPS) $(CHECK_SILENT) rm -rf &d-$*; mkdir &d-$* $(CHECK_SILENT) export SECNET_TEST_BUILDDIR=$(topbuilddir); \ export PYTHONBYTECODEBASE=/dev/null; \ diff --git a/test-example/Subdir.sd.mk b/test-example/Subdir.sd.mk index 835aab6..66cdaf8 100644 --- a/test-example/Subdir.sd.mk +++ b/test-example/Subdir.sd.mk @@ -2,11 +2,11 @@ include common.make -&/%.key: &,/%.key.b64 +&/%.key: &^/%.key.b64 base64 -d <$< >$@.new && mv -f $@.new $@ -&sites.conf: $(src)/make-secnet-sites &,sites Subdir.mk - $(src)/make-secnet-sites &,sites &sites.conf +&sites.conf: $(src)/make-secnet-sites &^/sites Subdir.mk + $(src)/make-secnet-sites &^/sites &sites.conf &clean:: rm -f *~ ./#*# *.new -- 2.30.2