home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / misc / soa-easy.shar / Makefile < prev    next >
Encoding:
Makefile  |  1996-10-25  |  3.3 KB  |  155 lines

  1. # Makefile -    For updating/installing DNS data files
  2. #
  3. # $Id: soa-easy.shar,v 8.2 1996/10/25 17:08:00 vixie Exp $
  4. # $Source: /proj/src/isc/cvs-1/bind/contrib/misc/soa-easy.shar,v $
  5. #
  6. # DESCRIPTION
  7. #    If you add a new file, you must add it to the appropriate
  8. #    macro below.  If the file is a ".zone" file, you should
  9. #    also add a ".SOA" file to one of the SOA macros below, and do
  10. #    a "make depend".  This will ensure the ".SOA" file is
  11. #    generated and updated properly.
  12. #
  13. #    If you add or remove an $INCLUDE directive in any file,
  14. #    do a "make depend".
  15. #
  16. # NOTE
  17. #    Part of the contents of this file are modified by the "depend"
  18. #    target.
  19.  
  20.  
  21. DIR =        /local/domain
  22. USER =        root
  23. GROUP =        root
  24. MODE =        440
  25.  
  26. #
  27. # Name of an authoritative root nameserver
  28. #
  29. AUTH_ROOT_NS =    NIC.NORDU.NET
  30.  
  31. #
  32. # These may need customisation
  33. #
  34. INSTALL =    op install -o $(USER) -g $(GROUP) -m $(MODE)
  35. CONFIGURE =    op named.reload
  36.  
  37.  
  38. MISC =    named.boot root.cache localhost.zone \
  39.     0.0.127.IN-ADDR.ARPA.zone
  40.  
  41. #
  42. # These macros will have to be customised
  43. #
  44. FORWARD = \
  45.     example.org.au.zone \
  46.     sub.example.org.au.zone net.example.org.au.zone \
  47.     client.org.au.zone
  48.  
  49. FORWARD_SOA = \
  50.     example.org.au.SOA \
  51.     sub.example.org.au.SOA net.example.org.au.SOA \
  52.     client.org.au.SOA
  53.  
  54. REVERSE = \
  55.     254.191.IN-ADDR.ARPA.zone \
  56.     1.254.191.IN-ADDR.ARPA.zone 16.254.191.IN-ADDR.ARPA.zone \
  57.     16.254.191.IN-ADDR.ARPA.zone \
  58.     253.191.IN-ADDR.ARPA.zone
  59.  
  60. REVERSE_SOA = \
  61.     254.191.IN-ADDR.ARPA.SOA \
  62.     1.254.191.IN-ADDR.ARPA.SOA 16.254.191.IN-ADDR.ARPA.SOA \
  63.     16.254.191.IN-ADDR.ARPA.SOA \
  64.     253.191.IN-ADDR.ARPA.SOA
  65.  
  66. INCLUDE = \
  67.     NS.generic MX.generic \
  68.     sub-pcs.example.org.au.inc
  69.  
  70. ZONES =    $(FORWARD) $(REVERSE)
  71.  
  72. SOAS =    $(FORWARD_SOA) $(REVERSE_SOA)
  73.  
  74. #
  75. # These files are considered removable
  76. #
  77. CLEAN = $(ZONES) $(SOAS) $(MISC)
  78.  
  79. #
  80. # This order is important (in case named is restarted during install)
  81. #
  82. DEPENDANT =    $(INCLUDES) $(ZONES)
  83. FILES =        $(MISC) $(DEPENDANT) $(SOAS)
  84.  
  85.  
  86. #
  87. # Custom make rules
  88. #
  89. .SUFFIXES: .zone .SOA $(SUFFIXES)
  90.  
  91. .zone.SOA:
  92.     ./make-SOA -o $@ $<
  93.  
  94. .DEFAULT:
  95.     co $@
  96.  
  97.  
  98.  
  99. all : $(FILES)
  100.  
  101. #
  102. # To get an up-to-date root.cache, we ask an authoritative root
  103. # nameserver.
  104. #
  105. root.cache :
  106.     dig @$(AUTH_ROOT_NS) . NS > dig.out && mv -f dig.out $@
  107.  
  108. install : install.timestamp
  109.  
  110. #
  111. # By using $?, only those files changed since last install are
  112. # installed.  This can save a lot of time.
  113. #
  114. install.timestamp : $(FILES)
  115.     @for f in $? ;\
  116.     do \
  117.         echo "$(INSTALL) $$f $(DIR)/$$f" ;\
  118.         $(INSTALL) $$f $(DIR)/$$f ;\
  119.     done
  120.     @touch $@
  121.     @chmod 660 2>/dev/null || true $@
  122.  
  123. #
  124. # Target that makes changes take effect
  125. #
  126. configure : install
  127.     $(CONFIGURE)
  128.  
  129. #
  130. # clean is tidy; clobbered is very tidy, but will cause work to regenerate
  131. #
  132. clean :
  133.     rm -f *~ core
  134.     
  135. clobber : clean
  136.     rm -f $(CLEAN) install.timestamp
  137.  
  138. depend : $(DEPENDANT)
  139.     sed '/^# --MAKEDEPEND--.*DO NOT DELETE/q' < Makefile > Makefile.new
  140.     ./make-depend $(SOAS) >> Makefile.new
  141.     mv -f Makefile Makefile.old
  142.     mv -f Makefile.new Makefile
  143.  
  144. #
  145. # --MAKEDEPEND--    DO NOT DELETE THIS LINE, or modify anything below it
  146. example.org.au.SOA :    NS.generic MX.generic
  147. sub.example.org.au.SOA :    NS.generic MX.generic sub-pcs.example.org.au.inc
  148. net.example.org.au.SOA :    NS.generic MX.generic
  149. client.org.au.SOA :    NS.generic MX.generic
  150. 254.191.IN-ADDR.ARPA.SOA :    NS.generic
  151. 1.254.191.IN-ADDR.ARPA.SOA :    NS.generic
  152. 16.254.191.IN-ADDR.ARPA.SOA :    NS.generic
  153. 16.254.191.IN-ADDR.ARPA.SOA :    NS.generic
  154. 253.191.IN-ADDR.ARPA.SOA :    NS.generic
  155.