chiark
/
gitweb
/
~mdw
/
zones
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff6c53a
)
Makefile: Installation rules.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 19 Jul 2011 20:45:39 +0000
(21:45 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 19 Jul 2011 21:06:42 +0000
(22:06 +0100)
Primarily for zoneconf, though the hooks are pretty generic.
Makefile
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index 17fa80ff5cce9f5781bee90ae672e64bcf5f095b..6afd12baae424ba4a1cd9fe1759c6ff16814568e 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-17,9
+17,18
@@
V_AT_0 = @
###--------------------------------------------------------------------------
### Programs and options.
###--------------------------------------------------------------------------
### Programs and options.
+## Zone checking.
CHECKZONE = named-checkzone -i full \
-k fail -M fail -n fail -S fail -W fail
CHECKZONE = named-checkzone -i full \
-k fail -M fail -n fail -S fail -W fail
+## Zone installation.
+MASTER = localhost
+ifeq ($(MASTER),localhost)
+ZONEINST = userv zoneconf install
+else
+ZONEINST = ssh zoneconf@$(MASTER)
+endif
+
###--------------------------------------------------------------------------
### Utility functions.
###--------------------------------------------------------------------------
### Utility functions.
@@
-83,7
+92,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 \
$(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), \
$(V_AT)touch $@
all: $(ALL_ZONESTAMPS)
CLEANFILES += $(sort $(foreach s,$(ZONESETS), \
@@
-113,6
+123,17
@@
$(ALL_ZONECHECKS) : %.check : %.zone
check: $(ALL_ZONECHECKS)
.PHONY: check $(ALL_ZONECHECKS)
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)
## Files to clean.
clean:
rm -f $(CLEANFILES)