From: Ian Jackson Date: Wed, 4 Dec 2019 21:58:54 +0000 (+0000) Subject: test-example: all-privkeys: Define, and indirect through, a variable X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=d8452461549bfca49a9448138d61105d62797688;p=secnet.git test-example: all-privkeys: Define, and indirect through, a variable 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 --- diff --git a/test-example/Subdir.sd.mk b/test-example/Subdir.sd.mk index 41aaec5..c8f8379 100644 --- a/test-example/Subdir.sd.mk +++ b/test-example/Subdir.sd.mk @@ -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