This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 128
/
Makefile.in
163 lines (123 loc) · 4.44 KB
/
Makefile.in
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
160
161
162
163
#
# Make file to install/uninstall AsciiDoc
#
.NOTPARALLEL:
INSTALL = @INSTALL@
INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
SED = @SED@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datadir = @datadir@
docdir = @docdir@
sysconfdir = @sysconfdir@
datarootdir = @datarootdir@
mandir=@mandir@
srcdir = @srcdir@
VPATH = @srcdir@
ASCIIDOCCONF = $(sysconfdir)/asciidoc
prog = asciidoc.py a2x.py
progdir = $(bindir)
manp = $(patsubst %1.txt,%1,$(wildcard doc/*.1.txt))
manpdir = $(mandir)/man1
conf = $(wildcard *.conf)
confdir = $(ASCIIDOCCONF)
filtersdir = $(ASCIIDOCCONF)/filters
codefilter = filters/code/code-filter.py
codefilterdir = $(filtersdir)/code
codefilterconf = filters/code/code-filter.conf
codefilterconfdir = $(filtersdir)/code
graphvizfilter = filters/graphviz/graphviz2png.py
graphvizfilterdir = $(filtersdir)/graphviz
graphvizfilterconf = filters/graphviz/graphviz-filter.conf
graphvizfilterconfdir = $(filtersdir)/graphviz
musicfilter = filters/music/music2png.py
musicfilterdir = $(filtersdir)/music
musicfilterconf = filters/music/music-filter.conf
musicfilterconfdir = $(filtersdir)/music
sourcefilterconf = filters/source/source-highlight-filter.conf
sourcefilterconfdir = $(filtersdir)/source
latexfilter = filters/latex/latex2img.py
latexfilterdir = $(filtersdir)/latex
latexfilterconf = filters/latex/latex-filter.conf
latexfilterconfdir = $(filtersdir)/latex
themesdir = $(ASCIIDOCCONF)/themes
flasktheme = themes/flask/flask.css
flaskthemedir = $(themesdir)/flask
volnitskytheme = themes/volnitsky/volnitsky.css
volnitskythemedir = $(themesdir)/volnitsky
docbook = $(wildcard docbook-xsl/*.xsl)
docbookdir = $(ASCIIDOCCONF)/docbook-xsl
dblatex = $(wildcard dblatex/*.xsl) $(wildcard dblatex/*.sty)
dblatexdir = $(ASCIIDOCCONF)/dblatex
css = $(wildcard stylesheets/*.css)
cssdir = $(ASCIIDOCCONF)/stylesheets
js = $(wildcard javascripts/*.js)
jsdir = $(ASCIIDOCCONF)/javascripts
callouts = $(wildcard images/icons/callouts/*)
calloutsdir = $(ASCIIDOCCONF)/images/icons/callouts
icons = $(wildcard images/icons/*.png) images/icons/README
iconsdir = $(ASCIIDOCCONF)/images/icons
doc = $(wildcard README*) $(wildcard BUGS*) $(wildcard INSTALL*) $(wildcard CHANGELOG*)
DATATARGETS = manp conf docbook dblatex css js callouts icons codefilterconf musicfilterconf sourcefilterconf graphvizfilterconf latexfilterconf flasktheme volnitskytheme
PROGTARGETS = prog codefilter musicfilter graphvizfilter latexfilter
TARGETS = $(DATATARGETS) $(PROGTARGETS) doc
INSTDIRS = $(TARGETS:%=%dir)
.PHONY: $(TARGETS)
all: build
# create directories used during the install
$(INSTDIRS):
$(INSTALL) -d $(DESTDIR)/$($@)
$(PROGTARGETS): % : %dir
$(INSTALL_PROG) $($@) $(DESTDIR)/$($<)/
$(DATATARGETS): % : %dir
$(INSTALL_DATA) $($@) $(DESTDIR)/$($<)/
$(manp): %.1 : %.1.txt
python2 a2x.py -f manpage $<
docs:
$(INSTALL) -d $(DESTDIR)/$(docdir)
$(INSTALL_DATA) $(doc) $(DESTDIR)/$(docdir)
$(INSTALL) -d $(DESTDIR)/$(docdir)/docbook-xsl
$(INSTALL_DATA) docbook-xsl/asciidoc-docbook-xsl.txt $(DESTDIR)/$(docdir)/docbook-xsl
$(INSTALL) -d $(DESTDIR)/$(docdir)/dblatex
$(INSTALL_DATA) dblatex/dblatex-readme.txt $(DESTDIR)/$(docdir)/dblatex
$(INSTALL) -d $(DESTDIR)/$(docdir)/stylesheets
$(INSTALL_DATA) $(css) $(DESTDIR)/$(docdir)/stylesheets
$(INSTALL) -d $(DESTDIR)/$(docdir)/javascripts
$(INSTALL_DATA) $(js) $(DESTDIR)/$(docdir)/javascripts
$(INSTALL) -d $(DESTDIR)/$(docdir)/images
( cd images && \
cp -R * $(DESTDIR)/$(docdir)/images )
$(INSTALL) -d $(DESTDIR)/$(docdir)/doc
( cd doc && \
cp -R * $(DESTDIR)/$(docdir)/doc )
$(INSTALL) -d $(DESTDIR)/$(docdir)/examples/website
( cd examples/website && \
cp -R * $(DESTDIR)/$(docdir)/examples/website )
progsymlink:
(cd $(DESTDIR)/$(progdir); ln -sf asciidoc.py asciidoc)
(cd $(DESTDIR)/$(progdir); ln -sf a2x.py a2x)
fixconfpath:
@for f in $(prog); do \
echo "Fixing CONF_DIR in $$f"; \
$(SED) "s#^CONF_DIR = '.*'#CONF_DIR = '$(ASCIIDOCCONF)'#" $$f > $$f.out; \
mv $$f.out $$f; \
chmod +x $$f; \
done
build: fixconfpath $(manp)
install: all $(PROGTARGETS) $(DATATARGETS) progsymlink
uninstall:
rm -f $(DESTDIR)/$(progdir)/asciidoc
rm -f $(DESTDIR)/$(progdir)/asciidoc.py
rm -f $(DESTDIR)/$(progdir)/a2x
rm -f $(DESTDIR)/$(progdir)/a2x.py
rm -f $(DESTDIR)/$(manpdir)/asciidoc.1
rm -f $(DESTDIR)/$(manpdir)/a2x.1
rm -rf $(DESTDIR)/$(confdir)
rm -rf $(DESTDIR)/$(docdir)
clean:
rm -f $(manp)
test:
@echo "Nothing to see here...Move along."