chiark / gitweb /
changelog: start 0.6.8
[secnet.git] / test-example / Dir.sd.mk
index 775eef6ae616e501b66fd381baf85c06dcb83f2f..3b7305c784a4de22df39b6cf4aaaca016e26c0f4 100644 (file)
@@ -1,5 +1,9 @@
+# This file is part of secnet.
+# See LICENCE and this file CREDITS for full list of copyright holders.
+# SPDX-License-Identifier: GPL-3.0-or-later
+# There is NO WARRANTY.
+
 &TARGETS += & sites.conf sites-nonego.conf
-&TARGETS += & inside.key outside.key rsa1-sites2.key all-privkeys
 
 include common.make
 
@@ -17,16 +21,19 @@ include common.make
 &clean::
        rm -rf &pubkeys
 
-define privkey
-&/$1.privkeys/priv.$2: &/$3
-       mkdir -p $$(dir $$@) && cp $$< $$@.tmp && mv -f $$@.tmp $$@
-&all-privkeys:: &/$1.privkeys/priv.$2
+&:macro &privkey
+&/&$1.privkeys/priv.&$2: &/&$3
+       mkdir -p $(dir $@) && cp $< $@.tmp && mv -f $@.tmp $@
+&PRIVKEYS += &/&$3 &/&$1.privkeys/priv.&$2
 &clean::
-       rm -rf &/$1.privkeys
-endef
+       rm -rf &/&$1.privkeys
+&:endm
+
+&{&privkey,outside,5dc36a4700,rsa1-sites2.key}
+&{&privkey,outside,0000000000,outside.key}
+&{&privkey,inside,0000000000,inside.key}
 
-$(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