| 1 |
# $Id: Makefile 77671 2026-02-07 23:16:44Z karl $ |
| 2 |
# Makefile for TeX Live documentation. Public domain. |
| 3 |
doc = texlive-en |
| 4 |
|
| 5 |
all: pdf html |
| 6 |
|
| 7 |
# in case we need to test changes against some previous version. |
| 8 |
#systex = /usr/local/texlive-rel/texmf-dist/tex// |
| 9 |
systex = : |
| 10 |
tlpre = # possible prefix to run from pretest, etc. |
| 11 |
env = TEXINPUTS=.:../texlive-en:../texlive-common:$(systex); export TEXINPUTS; |
| 12 |
|
| 13 |
pdflatex_opts = --file-line-error |
| 14 |
texline = '\nonstopmode\def\Status{1}\input $(doc)' |
| 15 |
pdflatex = $(tlpre) pdflatex $(pdflatex_opts) $(texline) |
| 16 |
|
| 17 |
# The story here is that for HTML, we just want <img> tags referring to |
| 18 |
# the graphics (in ../texlive-common), without specifying any size, |
| 19 |
# since their natural size is ok (enough). But LaTeX's \includegraphics |
| 20 |
# requires a size (htlatex runs latex, not pdflatex, so it can't |
| 21 |
# determine the size for .png files), and tex4ht passes that warning on, |
| 22 |
# which is just an annoyance. We could generate .xbb files, but then |
| 23 |
# we'd have to update them every year, which seems like a waste of time |
| 24 |
# when we don't want a size in the first place. |
| 25 |
# |
| 26 |
texfot_pdf = texfot --ignore='Package microtype Warning: Unable to apply patch' |
| 27 |
texfot_html = texfot --ignore="Cannot determine size of graphic" \ |
| 28 |
--ignore='File.*\.xbb\"' \ |
| 29 |
|
| 30 |
pdf: |
| 31 |
rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out |
| 32 |
$(env) $(texfot_pdf) $(pdflatex) |
| 33 |
$(env) $(texfot_pdf) $(pdflatex) |
| 34 |
$(env) $(texfot_pdf) $(pdflatex) |
| 35 |
$(env) $(texfot_pdf) $(pdflatex) |
| 36 |
|
| 37 |
# It is best to use the htlatex wrapper since then we can easily specify |
| 38 |
# these options; using \Preamble in live4ht.cfg is not equivalent. |
| 39 |
# |
| 40 |
# The options here: |
| 41 |
# live4ht - reads our live4ht.cfg. |
| 42 |
# info - extra debugging info. |
| 43 |
# xhtml - required for html5. |
| 44 |
# html5 - output viewport decl to help on small screens. |
| 45 |
# charset - UTF-8 is more likely to work well than Latin 1. |
| 46 |
# fn-in - keep footnotes in the main output file. |
| 47 |
# |
| 48 |
# The other argument, where we pass, -cunihtf -utf8, goes along with the |
| 49 |
# charset and tells tex4ht to look for Unicode font encodings. See |
| 50 |
# https://tug.org/tex4ht. |
| 51 |
# |
| 52 |
htopts1 = "live4ht,info,xhtml,html5,charset=utf-8,fn-in" |
| 53 |
htopts2 = " -cunihtf -utf8" |
| 54 |
run_htlatex = $(env) $(texfot_html) htlatex $(doc) $(htopts1) $(htopts2) </dev/null |
| 55 |
html: |
| 56 |
rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out |
| 57 |
$(run_htlatex) |
| 58 |
ls -l texlive-??.html texlive-??.css |
| 59 |
|
| 60 |
# This is the old way, no longer used. |
| 61 |
html-separate: |
| 62 |
rm -f *.aux *.toc *.lof *.lot *.xref* *.tmp *.out *.4tc |
| 63 |
# this sequence is equivalent to running "ht latex $(doc)". We do it |
| 64 |
# this way so we can \def\Status for the \ifcase in tex-live.sty. |
| 65 |
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)' |
| 66 |
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)' |
| 67 |
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)' |
| 68 |
$(env) latex '\nonstopmode\def\Status{2}\input $(doc)' |
| 69 |
$(env) tex4ht $(doc) |
| 70 |
$(env) t4ht $(doc) |
| 71 |
|
| 72 |
# just run tex once without cleaning temp files. |
| 73 |
pdf1 p: |
| 74 |
$(env) $(texfot_pdf) $(pdflatex) |
| 75 |
|
| 76 |
# ditto for html. |
| 77 |
html1 h: |
| 78 |
$(run_htlatex) |
| 79 |
|
| 80 |
clean: |
| 81 |
rm -f *.aux *.log *.blg *.toc *.out *.lot tex4ht.ps *.4* |
| 82 |
rm -f *.xref* *.lg *.idv *.out *.otc *.tmp tmp.* |
| 83 |
rm -f $(doc).dvi $(doc).ps |
| 84 |
|
| 85 |
realclean: clean |
| 86 |
rm -f $(doc).pdf |
| 87 |
rm -f *.html *.htm $(doc).css *.gif *.jpg |
| 88 |
|
| 89 |
spell: |
| 90 |
cat texlive-??.tex \ |
| 91 |
| aspell list --mode=tex --add-extra-dicts=`pwd`/.dict.pws \ |
| 92 |
| sort -f -u |
| 93 |
|
| 94 |
svr: |
| 95 |
svn revert texlive-??.css texlive-??.html texlive-??.pdf |
| 96 |
svn status |