From: Ian Jackson Date: Mon, 2 Dec 2019 13:45:16 +0000 (+0000) Subject: test-example: Rules for making a privkeys directory X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=e630cee2333b6c71a8873cf525e9c1554e8b4a74;p=secnet.git 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 --- 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