
# This is a Makefile to build the presentation as a number of modules.
# You shouldn't normally have to run this.  The presentation should be
# shipped pre-built.  You should only have to run this if any changes
# are made to the files in this directory.

VERSION=1.0.7
SOURCES=$(wildcard module-*.content)
NUMMODS=$(words $(SOURCES))
MODULES=$(patsubst %.content,%.html,$(SOURCES))

.PHONY: presentation

presentation: header footer $(MODULES)
	for module in module-*.html; do basename="`basename "$$module" .html`"; title="`tr ' /' __ < "$$basename".title`"; cp "$$module" ../lojban-thing-"$$basename"-"$$title".html; done

%.html: %.content %.title
	./synthesize "$(VERSION)" "$(NUMMODS)" "$<" > "$@"

clean:
	-rm module-*.html

