/ [latexrefman] / trunk / Makefile
To checkout: svn checkout http://svn.gnu.org.ua/sources/latexrefman/trunk/Makefile
Puszcza

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 863 - (show annotations)
Sat Dec 19 16:35:19 2020 UTC (4 months, 2 weeks ago) by karl
File size: 4950 byte(s)
clarify license
1 # $Id$
2 # Public domain. Originally written 2006, Karl Berry.
3 # Makefile for latexrefman.
4
5 en_tex_output = latex2e.dvi latex2e.pdf
6 es_tex_output = latex2e-es.dvi latex2e-es.pdf
7 fr_tex_output = latex2e-fr.dvi latex2e-fr.pdf
8 #
9 xref_suffixes := ky cp vr fn cp pg tp
10 xref_suffixes := $(xref_suffixes) $(addsuffix s,$(xref_suffixes))
11 xref_suffixes := aux log toc $(xref_suffixes)
12 mi_suffixes = dbk html info txt xml
13 en_mi_output = $(addprefix latex2e., $(mi_suffixes))
14 es_mi_output = $(addprefix latex2e-es., $(mi_suffixes))
15 fr_mi_output = $(addprefix latex2e-fr., $(mi_suffixes))
16 #
17 all_suffixes = dvi pdf $(mi_suffixes)
18
19
20 # how to build.
21 #
22 texi2dvi = texfot texi2dvi --batch --tidy --build-dir=$*.t2dvi
23 texi2pdf = texfot texi2pdf --batch --tidy --build-dir=$*.t2pdf
24 #
25 makeinfo = makeinfo
26 texi2docbook = $(makeinfo) --docbook
27 texi2html = $(makeinfo) --no-split $(htmlopts)
28 texi2info = $(makeinfo) --no-split
29 texi2txt = $(makeinfo) --plaintext --no-split
30 texi2xml = $(makeinfo) --xml
31 #
32 htmlopts = --html --css-include=latex2e.css $(t2html_top) $(t2html_home) -c WORDS_IN_PAGE=10000
33 #
34 # Go somewhere useful from Top:
35 t2html_top = -c TOP_NODE_UP_URL=https://tug.org/texinfohtml/
36 #
37 # Put a link in the footer:
38 t2html_home = -c PRE_BODY_CLOSE="<hr/><div class='referenceinfo'>\
39 <a href='https://latexref.xyz/'>\
40 <i>Unofficial LaTeX2e reference manual</i></a></div>"
41
42 %.pdf: %.texi
43 $(texi2pdf) $<
44 %.dvi: %.texi
45 $(texi2dvi) $<
46 #
47 %.dbk: %.texi
48 $(texi2docbook) -o $@ $<
49 %.html: %.texi %.css
50 $(texi2html) $<
51 %.info: %.texi
52 $(texi2info) $<
53 %.txt: %.texi
54 $(texi2txt) -o $@ $<
55 %.xml: %.texi
56 $(texi2xml) $<
57
58
59 # targets follow.
60 #
61 default: check-en
62
63 # to test changes, build a subset: html and info (since these formats
64 # exercise significantly different code paths), and pdf for tex.
65 check_suffixes = html info pdf
66 #
67 check-en: spell-en $(addprefix latex2e., $(check_suffixes))
68 check-es: $(addprefix latex2e-es., $(check_suffixes))
69 check-fr: $(addprefix latex2e-fr., $(check_suffixes))
70 check: check-en check-es check-fr
71
72 # Build per language.
73 en: $(en_mi_output) $(en_tex_output)
74 es: $(es_mi_output) $(es_tex_output)
75 fr: $(fr_mi_output) $(fr_tex_output)
76
77 # To build everything in all languages.
78 all: en es fr
79
80 # Sort of following the GNU sequence of clean targets.
81 distclean clean mostlyclean:
82 rm -rf latex2e*.t2* latex2e-help-texinfo-tree*
83
84 realclean maintainer-clean: distclean
85 rm -f $(addprefix latex2e*., pdf dvi $(mi_suffixes) $(xref_suffixes))
86
87
88 # dist for CTAN. Update NEWS before uploading!
89 #
90 txt_files = ChangeLog Makefile NEWS README \
91 aspell.en.pws latex2e.css ltx-help.el
92 # html_files = index.html mirroring.html writing.html
93 figure_files = list.eps list.pdf list.png list.txt
94 figure_source_files = asy/list.asy
95 distname = latex2e-help-texinfo
96 distzip = $(distname).zip
97 #
98 htmlsplit = $(distname)-tree
99 #
100 dist: en es
101 rm -rf $(distname)
102 mkdir $(distname) && cd $(distname) && ln -s ../* .
103 mkdir $(distname)/spanish && cd $(distname)/spanish && ln -s ../../* .
104 rm -f $(distzip)
105 zip -q $(distzip) \
106 $(addprefix $(distname)/, $(txt_files) \
107 latex2e.texi common.texi $(en_mi_output) latex2e.pdf) \
108 $(addprefix $(distname)/spanish/, $(es_mi_output) latex2e-es.pdf) \
109 $(addprefix $(distname)/latex2e-figures/, $(figure_files)) \
110 $(addprefix $(distname)/graphics/, README $(figure_source_files))
111 rm -rf $(distname)
112 @ls -l $(distzip); unzip -l $(distzip)
113
114 # Get many small .html files
115 htmlsplit: en
116 rm -rf $(htmlsplit)
117 mkdir $(htmlsplit) && cd $(htmlsplit) && ln -s ../* .
118 cd $(htmlsplit) && $(makeinfo) $(htmlopts) latex2e.texi
119 cd $(htmlsplit)/latex2e && ln -s ../../latex2e-figures .
120
121 # Right before a commit, delete html files that are gone and add new ones.
122 htmlsplitstatus = cd $(htmlsplit)/latex2e && svn status *.html
123 commitready: htmlsplit
124 $(htmlsplitstatus) | sed -n 's/^\!//p' | xargs -r svn rm
125 $(htmlsplitstatus) | sed -n 's/^\?//p' | xargs -r svn add
126 # we linked everything above, remove the unused upper-level links.
127 cd $(htmlsplit) && svn status | sed -n 's/^\?//p' | xargs rm -f
128 rm -rf latex2e.t2dvi # fix requires rebuilding svn repo, it seems
129 svn status
130
131 # A hacky spell check target.
132 # Remove \commandnames to reduce exception list, but not {args} or
133 # [args], since they are often words.
134 spell spell-en:
135 sed -e 's/\\[a-zA-Z]*//g' latex2e.texi \
136 | aspell list --mode=texinfo --add-extra-dicts=`pwd`/aspell.en.pws \
137 | sort -f -u
138
139 # Check for doubled words.
140 # http://www.math.utah.edu/~beebe/software/file-tools.html#dw
141 # The first sed expression elides a few @-command lines which cause
142 # duplicates; the second expr some text in the middle of lines.
143 check-dw:
144 sed -e 's/^@\(item\|anchor\|.index\) .*//' \
145 -e 's/ da da\|{test test}\|[iI][jJ]//g' \
146 latex2e.texi | dw
147
148 # Convenience targets to svn revert the generated files,
149 # and svn diff the source files.
150 svr:
151 svn revert $(addprefix latex2e*., $(all_suffixes))
152 svn status
153 svd:
154 svn diff $(txt_files) *.texi

Properties

Name Value
svn:keywords Date Author Id

Send suggestions and bug reports to Sergey Poznyakoff
ViewVC Help
Powered by ViewVC 1.1.20