From bd4e6927effd5dbfcaaf349ca7f5517b90c495bb Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 23 Oct 2015 14:56:51 -0200 Subject: [PATCH] completely separate documentation by environment --- docs/Makefile | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 37eb1a7..0b87aa1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,27 +6,33 @@ all: SPB_ENV ?= local +build_dir = _build/$(SPB_ENV) + # autogenerated DNS documentation -BUILT += _build/dns.rst -_build/dns.rst: ../test/dns_test.sh +BUILT += $(build_dir)/dns.rst +$(build_dir)/dns.rst: ../test/dns_test.sh + mkdir -p $(build_dir) (cd .. && sh test/dns_test.sh --doc) > $@ -BUILT += $(patsubst %.svg, _build/%.png, $(wildcard *.svg)) -_build/%.png: %.png +BUILT += $(patsubst %.svg, $(build_dir)/%.png, $(wildcard *.svg)) +$(build_dir)/%.png: %.png + mkdir -p $(build_dir) cp $< $@ arquitetura.png: inkscape --export-area-page --export-width=800 --export-width=600 --export-png=$@ $< -BUILT += $(patsubst %.in, _build/%, $(wildcard *.in)) -_build/%: %.in build.rb +BUILT += $(patsubst %.in, $(build_dir)/%, $(wildcard *.in)) +$(build_dir)/%: %.in build.rb + mkdir -p $(build_dir) ruby -p build.rb $< > $@ || ($(RM) $@; false) CLEAN_FILES += $(BUILT) html latexpdf: $(BUILT) - $(MAKE) -C _build $@ BUILDDIR=$(SPB_ENV) + mkdir -p $(build_dir) + $(MAKE) -C $(build_dir) -f ../Makefile $@ clean: $(RM) $(BUILT) - $(MAKE) -C _build $@ + $(RM) -r $(build_dir) -- libgit2 0.21.2