forked from embench/embench-iot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (34 loc) · 903 Bytes
/
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
41
42
43
44
45
46
47
48
# Makefile to assist Embench documentation
# Copyright (C) 2019 Embecosm Limited
#
# Contributor: Jeremy Bennett <[email protected]>
#
# This file is part of Embench.
# SPDX-License-Identifier: GPL-3.0-or-later
# Generate a table of contents
.PHONY: toc
toc: README.md
./gentoc.sh
# Spell check the documentation
.PHONY: spell
spell: README.md custom.wordlist
@sed < README.md -e 's/`[^`]\+`//g' -e '/^```/,/^```$$/d' \
-e 's/&#[^;]\+;//g' \
-e 's/<!-- .\+ -->//g' -e 's/\[.\+\]([^)]*)//g' | \
hunspell -p custom.wordlist -l -d en-US | sort -u
# PDF version of the documentation
.phony: pdf
pdf: README.pdf
README.pdf: README.md
pandoc -o $@ $^
# HTML version of the documentation
.phony: html
html: README.html
README.html: README.md
pandoc -o $@ $^
# Clean up intermediate files
.phony: clean
clean:
$(RM) README.pdf
$(RM) README.html
$(RM) README.md.old