forked from dotswg/dots-architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 580 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 580 Bytes
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
26
27
28
29
30
31
# Copied from Carsten Bormann's kramdown-rfc tutorial
#
OPEN=$(word 1, $(wildcard /usr/bin/xdg-open /usr/bin/open /bin/echo))
SOURCES?=$(filter-out README.md,${wildcard *.md})
DRAFTS=${SOURCES:.md=.txt}
HTML=${SOURCES:.md=.html}
XML=${SOURCES:.md=.xml}
all: xml html txt
html: $(HTML)
txt: $(DRAFTS)
xml: $(XML)
%.xml: $(SOURCES)
sed -e 's/@DATE@/$(date +%Y-%m-%d)/' $< > [email protected]
kramdown-rfc2629 [email protected] >[email protected]
mv [email protected] $@
%.html: %.xml
xml2rfc --html $<
$(OPEN) $@
%.txt: %.xml
xml2rfc $< $@
clean:
rm -f ${DRAFTS} ${HTML} ${XML} ${SOURCES}.tmp