chiark / gitweb /
test-example: all-privkeys: Define, and indirect through, a variable
[secnet.git] / 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