Browse Source

Added new global Makefile

testing
Alejandro Mery 15 years ago
parent
commit
fa92193eab
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      Makefile

+ 19
- 0
Makefile

@ -0,0 +1,19 @@
TEMPLATES=$(wildcard root/*/*.zone.in)
ZONES=$(addprefix stage/,$(notdir $(basename $(TEMPLATES))))
.PHONY: all
all: $(ZONES)
root/preprocessor.sed: root/preprocessor.sh $(wildcard root/*.in) root/servers.txt
@$< > $@
define ZONE_TEMPLATE
stage/$(2).zone: $(1) root/preprocessor.sed
@echo "$(2)"
@sed -f root/preprocessor.sed \
-e 's,@@DOMAIN@@,$(2),g' \
$$< > $$@
endef
$(foreach tpl,$(TEMPLATES),$(eval $(call ZONE_TEMPLATE,$(tpl),$(patsubst %.zone.in,%,$(notdir $(tpl))))))

Loading…
Cancel
Save