-define(`PRIMARY', `divert(0)ZONEDIR/nsc_file_name($1):nsc_prepend_cf_multi($@) $(DDEPS)
- `$'(NSC)nsc_prepend_cf_multi($@) >ZONEDIR/nsc_file_name($1) -DVERS=VERSDIR/nsc_file_name($1)
+define(`nsc_key_dep', `ifelse(USE_DNSSEC,,,` 'khash/nsc_file_name($1) keys/resign-stamp)')
+define(`PRIMARY', `define(`CURRENT_TARGET',zone/nsc_file_name($1))
+divert(0)CURRENT_TARGET:nsc_prepend_cf_multi($@)nsc_key_dep($1) $(DDEPS)
+ @bin/genzone nsc_file_name($1)`'nsc_prepend_cf_multi($@)