about summary refs log tree commit diff homepage
path: root/Makefile
blob: ae906ebdf5a55efdd100f6a785f14eee23755ad8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
SHELL = /bin/sh

MD = $(shell find . -name '[!README]*.md')
GMI := $(patsubst %.md,gemini/%.gmi,$(MD:./%=%))
XHTML := $(patsubst %.md,www/%.xhtml,$(MD:./%=%))

all: gemini www

%/:
	mkdir $@

gemini/%.gmi: www/%.xhtml gemini/
	xsltproc gmi.xslt $< > $@

gemini: $(GMI)

www/%.xhtml: %.md www/
	makepage < $< | xsltproc xhtml.xslt - > $@

www: $(XHTML)

clean:
	rm -f $(GMI) $(XHTML)

.PHONY: all gemini www