2 # NSC -- Makefile & Config file build script
3 # (c) 1997--2000 Martin Mares <mj@ucw.cz>
5 ROOT=/etc/named # Root dir of the whole package
6 CF=cf # Place for all configuration files
7 ZONES=zone # Place for all primary zone files
8 BAX=bak # Place for all secondary zone files
9 VERS=ver # Place for all primary version files
10 NSC=m4 # Place for all scripts
12 DOMAINS=$CF/domains # The master domain list
13 MKFILE=Makefile # Makefile to generate
14 CONFFILE=named.conf # Configuration file to generate
17 M4=`which gm4` || M4=`which m4` || ( echo "Unable to find M4!" ; exit 1 )
19 if [ ! -f $DOMAINS ] ; then
20 echo "Domain list file missing."
23 m4 $NSC/dnslib.m4 $NSC/mkconf.m4 $DOMAINS >$CONFFILE -DZONEDIR=$ZONES -DBAKDIR=$BAX -DCACHE=$CACHE -DROOT=$ROOT
24 m4 $NSC/dnslib.m4 $NSC/mkmf.m4 $DOMAINS >$MKFILE -DZONEDIR=$ZONES -DBAKDIR=$BAX -DCACHE=$CACHE -DVERSDIR=$VERS -DNSCDIR=$NSC -DCONF=$CONFFILE -DCFDIR=$CF -DM4=$M4