git.s-ol.nu alive / v0.1 Makefile
v0.1

Tree @v0.1 (Download .tar.gz)

Makefile @v0.1raw · history · blame

MODULES=$(wildcard alv-lib/*.moon) alv-lib/midi/launchctl.moon
MODREFS=$(MODULES:alv-lib/%.moon=docs/reference/%.html)
CORE=$(wildcard alv/*.moon alv/**/*.moon) $(wildcard alv/*.md)
DEPS=alv/version.moon $(wildcard docs/gen/*.moon)

.PHONY: docs test release clean reference internals

docs: docs/index.html docs/guide.html reference internals
	
test:
	busted

# docs parts
reference: $(MODREFS) docs/reference/index.html
internals: docs/internals/index.html

docs/%.html: docs/%.md $(DEPS)
	@echo "building page $<"
	docs/gen/md $@ $<

docs/reference/%.html: alv-lib/%.moon $(DEPS) 
	@echo "building docs for $<"
	@mkdir -p `dirname $@`
	docs/gen/module $@ alv-lib.$(subst /,.,$*) $(subst /,.,$*)

docs/reference/index.html: $(MODREFS) $(DEPS)
	docs/gen/index $@ $(MODULES)

docs/ldoc.ltp: $(DEPS)
	docs/gen/ldoc $@

docs/internals/index.html: alv/config.ld docs/ldoc.ltp $(CORE)
	ldoc alv

clean:
	rm -rf docs/reference
	rm -rf docs/internals/*/ docs/internals/*.css docs/internals/*.html
	rm -f docs/index.html docs/guide.html docs/ldoc.*