chiark / gitweb /
Makefile: Only include one copy of the old signatures.
[dnserr] / Makefile
index acdd75416ea15a9dddf2b04153c9d89590043fdd..d1c66539ecea9031d9012e97ad09f5c56df9c3f7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,9 +64,13 @@ CLEAN                        += t.oldsig
 dnserr.zone.sig: dnserr.zone.sigold dnserr.zone.signew
        awk '$(OLDSIGMATCH) { print; }' \
                dnserr.zone.sigold >t.oldsig
-       awk '$(OLDSIGMATCH) { system("cat t.oldsig"); next; } \
+       awk '$(OLDSIGMATCH) { \
+               if (!doneoldsig) { system("cat t.oldsig"); doneoldsig = 1; } \
+               next; \
+            } \
                { gsub(/invalid-rrsigx/, "invalid-rrsig"); print; }' \
-       dnserr.zone.signew >$@.new
+               dnserr.zone.signew >$@.new
+       rm t.oldsig
        mv $@.new $@
 
 CLEAN                  += $(TARGETS)