X-Git-Url: https://git.distorted.org.uk/~mdw/zones/blobdiff_plain/ff6c53ad07d4f9987d648085e8c0656fa825322d..c1b134c3e060f10a76b953c42d4f47d1fbf8bcc6:/Makefile diff --git a/Makefile b/Makefile index 17fa80f..49ae066 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,21 @@ V_AT_0 = @ ###-------------------------------------------------------------------------- ### Programs and options. +## Zone checking. CHECKZONE = named-checkzone -i full \ -k fail -M fail -n fail -S fail -W fail +## Zone installation. +MASTER = localhost +inside_MASTER = precision + + +ifeq ($(MASTER),localhost) +ZONEINST = userv zoneconf install +else +ZONEINST = ssh zoneconf@$(MASTER) +endif + ###-------------------------------------------------------------------------- ### Utility functions. @@ -51,24 +63,29 @@ ZONESETS = ZONESETS += distorted distorted_VIEWS = inside outside -distorted_outside_NETS = dmz -distorted_inside_NETS = unsafe +distorted_outside_NETS = dmz jump +distorted_inside_NETS = any unsafe colo vpn -distorted_all_ZONES = distorted.org.uk io.distorted.org.uk -distorted_inside_ZONES = 199.29.172.in-addr.arpa +distorted_all_ZONES += distorted.org.uk +distorted_all_ZONES += 199.29.172.in-addr.arpa ###-------------------------------------------------------------------------- ### The harlequin.org.uk zones. ZONESETS += harlequin -harlequin_VIEWS = inside outside -harlequin_outside_NETS = dmz -harlequin_inside_NETS = unsafe - +harlequin_VIEWS = outside harlequin_all_ZONES = harlequin.org.uk ###-------------------------------------------------------------------------- +### The felixpearce.com zones. + +ZONESETS += felixpearce + +felixpearce_VIEWS = outside +felixpearce_all_ZONES = felixpearce.com + +###-------------------------------------------------------------------------- ### Zone construction machinery. ZONE = zone @@ -83,7 +100,8 @@ ALL_ZONESTAMPS = $(foreach s,$(ZONESETS), \ $(ALL_ZONESTAMPS) : %.zonestamp : $$(notdir $$*).lisp hosts.lisp $(V_AT)mkdir -p $(dir $*) $(V_ZONE) -d$(dir $*) -fview/$(call dir-nosl,$*)$(hack \ - hack) $(addprefix -s, $($(notdir $*)_$(call dir-nosl,$*)_NETS)) $< + hack) $(addprefix -s, \ + $($(notdir $*)_$(call dir-nosl,$*)_NETS)) $< $(V_AT)touch $@ all: $(ALL_ZONESTAMPS) CLEANFILES += $(sort $(foreach s,$(ZONESETS), \ @@ -113,6 +131,17 @@ $(ALL_ZONECHECKS) : %.check : %.zone check: $(ALL_ZONECHECKS) .PHONY: check $(ALL_ZONECHECKS) +## Finally we have to install the zone files. +ALL_INSTALLS = $(foreach s,$(ZONESETS), \ + $(foreach v,$($s_VIEWS), \ + $(foreach z,$($s_all_ZONES) $($s_$v_ZONES), \ + $v/$z.inst))) +$(ALL_INSTALLS) : %.inst : %.check + $(call v_tag,INST)$(ZONEINST) \ + $(call dir-nosl,$*) $(notdir $*) <$*.zone +install: $(ALL_INSTALLS) +.PHONY: install $(ALL_INSTALLS) + ## Files to clean. clean: rm -f $(CLEANFILES)