Makefile 706 Bytes
all:
	@echo "Usage:"
	@echo
	@echo "make html				Builds the documentation in HTML"
	@echo "make latexpdf		Builds the documentation in PDF"

SPB_ENV ?= local

# autogenerated DNS documentation
BUILT += _build/dns.rst
_build/dns.rst: ../test/dns_test.sh
	(cd .. && sh test/dns_test.sh --doc) > $@

BUILT += $(patsubst %.svg, _build/%.png, $(wildcard *.svg))
_build/%.png: %.svg
	inkscape --export-area-page --export-width=800 --export-width=600 --export-png=$@ $<

BUILT += $(patsubst %.in, _build/%, $(wildcard *.in))
_build/%: %.in build.rb
	ruby -p build.rb $< > $@ || ($(RM) $@; false)

CLEAN_FILES += $(BUILT)

html latexpdf: $(BUILT)
	$(MAKE) -C _build $@

clean:
	$(RM) $(BUILT)
	$(MAKE) -C _build $@