blob: 166b3f999b189a69bc85797401403d9ef6e7483c (
plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
#####################################################################
#
# A-A-P file for making AsciiDoc web site.
# (you can obtain A-A-P from http://www.a-a-p.org)
#
# Stuart Rackham <srackham@gmail.com>
#####################################################################
:execute ../../common.aap
WEB_NAME = asciidoc
LAYOUT ?= layout2
# Various document locations.
PROJ_DIR = ../..
DOCS_DIR = $PROJ_DIR/doc
LOCAL_WEB = ~/webs/asciidoc # Local web marshalling location.
# List of web pages.
WEB_ROOT =
a2x.1
asciidoc-docbook-xsl
asciidoc-graphviz-sample
asciimathml
asciidocapi
CHANGELOG
epub-notes
faq
index
INSTALL
latex-backend
latex-bugs
latexmathml
manpage
music-filter
latex-filter
publishing-ebooks-with-asciidoc
README
README-website
source-highlight-filter
support
testasciidoc
userguide
version83
newtables
newlists
slidy
slidy-example
plugins
WEB_PAGES = $*(WEB_ROOT).html
WEB_SOURCE = $*(WEB_ROOT).txt
# Web site specific pages to spell check.
SPELL_CHECK =
index.txt
README-website.txt
support.txt
# Accompanying documents in DOCS_DIR.
DOCS_ROOT =
asciidoc
asciidoc.1
DOCS =
$*(DOCS_ROOT).txt
$*(DOCS_ROOT).html
$*(DOCS_ROOT).css-embedded.html
asciidoc.pdf
asciidoc.epub
asciidoc.1
article.txt article.html article-standalone.html article-html5-toc2.html
book.txt book.html
book-multi.txt book-multi.html
book.epub
article.pdf
latexmath.pdf
# Client applications.
@if OSTYPE == 'posix':
ASPELL = `program_path("aspell")`
@else:
:print ERROR: Unsupported operating system $OSTYPE
:exit
:syseval which xmllint | :assign XMLLINT # Validates XML.
ASCIIDOC = python ../../asciidoc.py
# AsciiDoc options to generate documentation HTML.
ASCIIDOC_HTML =
$ASCIIDOC -b xhtml11 -f $(LAYOUT).conf -a icons -a badges -a revnumber=$(VERS)@ -a revdate="$(DATE)@" -a max-width=70em -a source-highlighter=highlight
:rule %.html : %.txt $(LAYOUT).conf
@if target in ('userguide.html','faq.html'):
# User guide has author, revision, date in header.
opts = -a toc -a numbered
@elif target == 'index.html':
# Index has description and keywords meta tags.
opts = -a index-only
@elif target in ('manpage.html','a2x.1.html'):
opts = -d manpage
@elif target == 'asciimathml.html':
opts = -a asciimath
@elif target == 'latexmathml.html':
opts = -a latexmath
@else:
opts =
@if target in ('index.html','INSTALL.html','asciidocapi.html','testasciidoc.html','publishing-ebooks-with-asciidoc.html'):
opts += -a toc -a toclevels=1
:sys $ASCIIDOC_HTML $opts $(source[0])
@if _no.XMLLINT:
:sys $XMLLINT --nonet --noout --valid $target
@else:
:print WARNING: xmllint(1) unavailable: skipping validation
slidy.html : slidy.txt
:sys $ASCIIDOC $(source[0])
slidy-example.html : slidy-example.txt
:sys $ASCIIDOC $(source[0])
all: $(WEB_PAGES)
copy: all
# Copy to local web page.
:sys rm -rf $LOCAL_WEB/*
:sys mkdir -p $LOCAL_WEB/images/icons/callouts
:sys cp $WEB_PAGES $LOCAL_WEB
:sys cp $WEB_SOURCE $LOCAL_WEB
:sys cp *.css $LOCAL_WEB
:sys cp *.js $LOCAL_WEB
:execute $PROJ_DIR/main.aap distribution # Make docs and tarball.
:sys cp $DOCS_DIR/$*DOCS $LOCAL_WEB
:sys cp $PROJ_DIR/stylesheets/docbook-xsl.css $LOCAL_WEB
# Copy images.
:sys cp $DOCS_DIR/images/*.png $LOCAL_WEB/images/
:sys cp $DOCS_DIR/images/icons/*.png $LOCAL_WEB/images/icons/
:sys cp $DOCS_DIR/images/icons/callouts/*.png $LOCAL_WEB/images/icons/callouts/
# Copy chunked User Guide.
:sys rm -rf $LOCAL_WEB/chunked/
:sys mkdir -p $LOCAL_WEB/chunked/
:sys cp $DOCS_DIR/asciidoc.chunked/*.html $LOCAL_WEB/chunked/
:sys cp $DOCS_DIR/asciidoc.chunked/*.css $LOCAL_WEB/chunked/
:sys cp -R $DOCS_DIR/asciidoc.chunked/images $LOCAL_WEB/chunked/
:sys cp music?.* $LOCAL_WEB
:sys cp sample?.png $LOCAL_WEB
:sys cp latex?.png $LOCAL_WEB
:sys cp *__*.png $LOCAL_WEB
clean:
:del {f} $WEB_PAGES
:del {f} *.bak # Remove aspell backups.
spell: $(SPELL_CHECK)
# Interactively spell check all files.
@if _no.ASPELL:
@for s in source_list:
:sys {i} $ASPELL check -p ./$(WEB_NAME)-website.dict $s
@else:
:print WARNING: aspell(1) unavailable, skipping spell checking
|