-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (30 loc) · 1.15 KB
/
Makefile
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
32
33
34
35
36
37
38
39
40
SOURCES := intro.i.md index.i.md model.i.md feds.i.md
TARGETS := intro.md model.md feds.md indexList.md
METAS := references.dat toc.txt indexList.i.md sections.txt
SUBDIRS := sparql
all: ${SUBDIRS} ${METAS} ${TARGETS} index.md
@mv ${TARGETS} docs/
@cp sparql/*.code.md docs/sparql/
sections.txt: order.txt ${SOURCES}
@echo "Indexing the sections"
@groovy findSections.groovy > sections.txt
toc.txt: makeToC.groovy order.txt ${SOURCES}
@echo "Making the ToC"
@groovy makeToC.groovy > toc.txt
indexList.i.md: topics.tsv makeIndex.groovy
@echo "Making the index"
@groovy makeIndex.groovy > indexList.i.md
topics.tsv: ${SOURCES} findTopics.groovy
@echo "Extracting the topics"
@groovy findTopics.groovy . | sort > topics.tsv
references.qids: findCitations.groovy
@echo "Finding the citations"
@groovy findCitations.groovy . | grep "^Q" | sort | uniq > references.qids
references.dat: references.qids references.js
@nodejs references.js
index.md: index.i.md toc.txt createMarkdown.groovy
@echo "Creating $@"
@groovy createMarkdown.groovy index.i.md > docs/index.md
%.md : %.i.md createMarkdown.groovy
@echo "Creating $@"
@groovy createMarkdown.groovy $< > $@