From: Ian Jackson Date: Mon, 2 Dec 2019 13:45:16 +0000 (+0000) Subject: test-example: Rules for making a privkeys directory X-Git-Tag: v0.6.0~85 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a7ca0b5b63003bd77edf3a338ebd9a2a4eb549c7;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 e73be05..a8320c9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,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/Dir.sd.mk b/stest/Dir.sd.mk index d819170..be0a8d9 100644 --- a/stest/Dir.sd.mk +++ b/stest/Dir.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/Dir.sd.mk b/test-example/Dir.sd.mk index 30813b2..d3eb7d2 100644 --- a/test-example/Dir.sd.mk +++ b/test-example/Dir.sd.mk @@ -8,4 +8,14 @@ include common.make &sites.conf: $(src)/make-secnet-sites &^/sites &/Dir.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