From e630cee2333b6c71a8873cf525e9c1554e8b4a74 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 2 Dec 2019 13:45:16 +0000 Subject: [PATCH] test-example: Rules for making a privkeys directory This generates a directory suitable for use with the priv-cache closure. Nothing uses it yet. Signed-off-by: Ian Jackson --- .gitignore | 1 + stest/Subdir.sd.mk | 1 + test-example/Subdir.sd.mk | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 06a2925..a7fb58f 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ debian/secnet.substvars /build test-example/*.key +test-example/*.privkeys test-example/sites.conf test-example/bogus-setup-request build-stamp diff --git a/stest/Subdir.sd.mk b/stest/Subdir.sd.mk index d819170..be0a8d9 100644 --- a/stest/Subdir.sd.mk +++ b/stest/Subdir.sd.mk @@ -7,6 +7,7 @@ &DEPS += test-example/sites.conf &DEPS += test-example/inside.key &DEPS += test-example/outside.key +&DEPS += test-example/all-privkeys &:include test-common.sd.mk diff --git a/test-example/Subdir.sd.mk b/test-example/Subdir.sd.mk index 345b11a..b0a63b7 100644 --- a/test-example/Subdir.sd.mk +++ b/test-example/Subdir.sd.mk @@ -8,4 +8,14 @@ include common.make &sites.conf: $(src)/make-secnet-sites &^/sites &/Subdir.mk $(src)/make-secnet-sites &^/sites $@ +define privkey +&/$1.privkeys/priv.$2: &/$3 + mkdir -p $$(dir $$@) && cp $$< $$@.tmp && mv -f $$@.tmp $$@ +&all-privkeys:: &/$1.privkeys/priv.$2 +&clean:: + rm -rf &/$1.privkeys +endef + +$(eval $(call privkey,outside,0000000000,outside.key)) + &CLEAN += *.new -- 2.30.2