DNS data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
489 B

  1. TEMPLATES=$(wildcard root/*/*.zone.in)
  2. ZONES=$(addprefix stage/,$(notdir $(basename $(TEMPLATES))))
  3. .PHONY: all
  4. all: $(ZONES)
  5. root/preprocessor.sed: root/preprocessor.sh $(wildcard root/*.in) root/servers.txt
  6. @$< > $@
  7. define ZONE_TEMPLATE
  8. stage/$(2).zone: $(1) root/preprocessor.sed
  9. @echo "$(2)"
  10. @sed -f root/preprocessor.sed \
  11. -e 's,@@DOMAIN@@,$(2),g' \
  12. $$< > $$@
  13. endef
  14. $(foreach tpl,$(TEMPLATES),$(eval $(call ZONE_TEMPLATE,$(tpl),$(patsubst %.zone.in,%,$(notdir $(tpl))))))