forked from matthiasl/Erlang-FAQ
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 1.73 KB
/
Copy pathMakefile
File metadata and controls
67 lines (52 loc) · 1.73 KB
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
sources= \
faq.xml \
introduction.xml \
faq_questions.xml \
obtaining.xml \
getting_started.xml \
how_do_i.xml \
libraries.xml \
tools.xml \
implementations.xml \
problems.xml \
academic.xml \
mnesia.xml
# Erlang compiler
ERL=erl
XSL_FILES= \
faq_html.xsl \
faq_html_params.xsl
all: obj obj/faq.html obj/t1.html local_copy_of_definions
# Make a list of links in the document. I check these manually because
# an automatic checker is likely to miss semi-dead pages.
linkcheck: $(sources)
grep http $(sources) | cut -d \" -f 2 | sort | uniq > /home/matthias/links
obj:
mkdir obj
obj/faq.html: $(sources) $(XSL_FILES)
erl_docgen_privdir=`escript erl_docgen_privdir.escript`; \
date=`date +"%B %e %Y"`; \
xsltproc --stringparam outdir obj --stringparam gendate "$$date" --stringparam topdocdir . --xinclude -path $$erl_docgen_privdir/docbuilder_dtd -path $$erl_docgen_privdir/dtd_html_entities faq_html.xsl faq.xml
# Copy needed images, stylesheets and scripts
local_copy_of_definions:
erl_docgen_privdir=`escript erl_docgen_privdir.escript`; \
cp -a $$erl_docgen_privdir/css/otp_doc.css obj; \
cp -a $$erl_docgen_privdir/images/* obj; \
mkdir -p obj/js/flipmenu; \
cp -a $$erl_docgen_privdir/js/flipmenu/* obj/js/flipmenu
# Historically, the FAQ started at t1.html. Preserve that to avoid breaking
# people's links.
obj/t1.html: obj/faq.html
cp obj/faq.html obj/t1.html
ship:
(cd ..; tar -czvf ~/erlfaq.tgz faq/*.xml faq/Makefile faq/*erl faq/README faq/Makefile faq/erlang_magic_file)
# Install on erlang.org.
#
# We have to do some renaming to keep the traditional structure
# (faq.html should contain the frameset).
FAQ_ROOT=../public/faq
install: obj/faq.html
mkdir -p $(FAQ_ROOT)
cp -a obj/* $(FAQ_ROOT)
clean:
rm -rf obj/*