2 dnl ### NSC 2.2 -- Makefile Builder
3 dnl ### (c) 1997--1999 Martin Mares <mj@ucw.cz>
6 # Things we allow to override
8 define(`named_restart_cmd', `ndc reload')
10 # List of all version files available
12 define(`ALLVERS', CONF CACHE)
13 define(`ADDVER', `define(`ALLVERS', ALLVERS` $1')')
15 # Definition of primary domain
17 define(`PRIMARY', `divert(0)VERSDIR/$1 ZONEDIR/$1: CFDIR/$1
18 `$'(NSC) CFDIR/$1 >ZONEDIR/$1 -DVERS=VERSDIR/$1
24 # Definition of reverse domain
26 define(`REVCF', ` patsubst(CFDIR/$1,`^cf/\(.*\)\+\(.*\)$',`ZONEDIR/\1+\2')')
27 define(`REVERSi', `define(`ev',revaddr($1))define(`ew',`shift(shift($@))')
28 divert(0)VERSDIR/ev ZONEDIR/ev:iterate(`REVCF', `ew')
29 `$'(NSC)iterate(`REVCF', `ew') >ZONEDIR/ev -DVERS=VERSDIR/ev -DREVERSE=$2 -DREVBASE=$1
35 define(`REVERSE', `REVERSi($1,$@)')
36 define(`PREVERSE', `REVERSi($1,patsubst($1,`^\(.*\)\..*$',`\1'),shift($@))')
38 # Definition of partial reverse zone delegation (also called classless in-addr.arpa)
40 define(`PARTIAL', `divert(0)ZONEDIR/$1+$2:
41 `$'(PGEN) >ZONEDIR/$1+$2 -DBASE=revaddr($1) -DFROM=patsubst(`$1', `^.*\.\(.*\)$', `\1') -DCOUNT=$2 -DSERV=shift(shift($@))
45 # Insertion of raw makefile material
47 define(`MAKEFILE', `divert(0)$1
52 define(`cleanup', `divert(0)VERSDIR/.version: ALLVERS
54 touch VERSDIR/.version
57 find BAKDIR ZONEDIR -type f -maxdepth 1 | xargs rm -f
63 find VERSDIR -type f -maxdepth 1 | xargs rm -f
68 `#' Nameserver Configuration Makefile
69 `#' Generated by mkmf.m4 on curdate
70 `#' Please don't edit manually
73 NSC=M4 NSCDIR/dnslib.m4 NSCDIR/nsc.m4
74 PGEN=m4 NSCDIR/dnslib.m4 NSCDIR/pgen.m4