chiark / gitweb /
test-example: all-privkeys: Define, and indirect through, a variable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Dec 2019 21:58:54 +0000 (21:58 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:53 +0000 (21:56 +0000)
This seems more natural.  Also it provides a variable
$(test-example_PRIVKEYS) which can be used elsewhere.  (We are in fact
going to want that.)

One resulting change is that now the keys in *.privkeys/ are part of
&TARGETS too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
test-example/Dir.sd.mk

index 775eef6ae616e501b66fd381baf85c06dcb83f2f..809aa0a5ad8120e435c7cbca611b27b472234314 100644 (file)
@@ -1,5 +1,4 @@
 &TARGETS += & sites.conf sites-nonego.conf
-&TARGETS += & inside.key outside.key rsa1-sites2.key all-privkeys
 
 include common.make
 
@@ -20,7 +19,7 @@ include common.make
 define privkey
 &/$1.privkeys/priv.$2: &/$3
        mkdir -p $$(dir $$@) && cp $$< $$@.tmp && mv -f $$@.tmp $$@
-&all-privkeys:: &/$1.privkeys/priv.$2
+&PRIVKEYS += &/$3 &/$1.privkeys/priv.$2
 &clean::
        rm -rf &/$1.privkeys
 endef
@@ -29,4 +28,7 @@ $(eval $(call privkey,outside,5dc36a4700,rsa1-sites2.key))
 $(eval $(call privkey,outside,0000000000,outside.key))
 $(eval $(call privkey,inside,0000000000,inside.key))
 
+&all-privkeys:: $(&PRIVKEYS)
+
+&TARGETS += $(&PRIVKEYS)
 &CLEAN += *.new