| 1 |
## $Id: Makefile.am 66203 2023-02-26 21:56:36Z karl $ |
| 2 |
## Makefile.am for the TeX Live subdirectory ./doc/ |
| 3 |
## |
| 4 |
## Copyright 2015-2020 Karl Berry <[email protected]> |
| 5 |
## Copyright 2013-2015 Peter Breitenlohner <[email protected]> |
| 6 |
## You may freely use, modify and/or distribute this file. |
| 7 |
## |
| 8 |
## The info files |
| 9 |
info_TEXINFOS = tlbuild.texi |
| 10 |
tlbuild_TEXINFOS = build-tools.txt \ |
| 11 |
tlbuild-incl/install-tl.texi tlbuild-incl/tlmgr.texi |
| 12 |
|
| 13 |
EXTRA_DIST = \ |
| 14 |
README.solaris \ |
| 15 |
splitinfo.gawk |
| 16 |
|
| 17 |
# no reasonable way to avoid it with the pod doc. |
| 18 |
MAKEINFOFLAGS = --set INFO_SPECIAL_CHARS_WARNING=0 |
| 19 |
MAKEINFOFLAGS += --disable-encoding |
| 20 |
|
| 21 |
# autogenerate the top-level README files. |
| 22 |
readme-files: tlbuild.info |
| 23 |
rm -f README.* |
| 24 |
$(MAKEINFO) $(MAKEINFOFLAGS) --plaintext -o - $(srcdir)/tlbuild.texi \ |
| 25 |
| tee /tmp/a \ |
| 26 |
| gawk -f $(srcdir)/splitinfo.gawk |
| 27 |
ls -l README.* |
| 28 |
# head -8 README.* |
| 29 |
readme-install: readme-files |
| 30 |
cp -p README.* $(top_srcdir)/ |
| 31 |
svn diff $(top_srcdir)/README.* >/tmp/sd |
| 32 |
svn status $(top_srcdir)/README.* |
| 33 |
# |
| 34 |
.PHONY: readme-files readme-install script-links |
| 35 |
|
| 36 |
# autogenerate texinfo from install-tl and tlmgr pod. |
| 37 |
# none of this is intended to be executed except manually. |
| 38 |
mydoc = tlbuild |
| 39 |
|
| 40 |
# Needs to be the pod2texi from at least Texinfo 6.3. |
| 41 |
pod2texi = pod2texi |
| 42 |
pod2texi_args = \ |
| 43 |
--appendix-sections \ |
| 44 |
--base-level=section \ |
| 45 |
--no-fill-section-gaps \ |
| 46 |
--preamble='' |
| 47 |
|
| 48 |
# We use complicated section names in the tlmgr pod, and consequently |
| 49 |
# complicated section references, schematically like this: |
| 50 |
# L<whatever|/mysec I<myital>> |
| 51 |
# Unfortunately, the Pod module does not pass the necessary information |
| 52 |
# in the callbacks to allow pod2texi to preserve the I<>. It seems |
| 53 |
# better to kludge in some substitutions here than reimplement a whole |
| 54 |
# pod parser. Sigh. |
| 55 |
# |
| 56 |
# The \@... in the replacements are escaping the @ in a Perl |
| 57 |
# double-quote context, i.e., not an array. |
| 58 |
# |
| 59 |
update_node_bad = ref{tlmgr update [option...] [pkg...], |
| 60 |
update_node_good = ref{tlmgr update [\@emph{option}...] [\@emph{pkg}...], |
| 61 |
# |
| 62 |
update_node_bad2 = [option...] [pkg...], update |
| 63 |
update_node_good2 = [\@emph{option}...] [@emph{pkg}...], update |
| 64 |
# |
| 65 |
remove_node_bad = ref{tlmgr remove [option...] pkg..., |
| 66 |
remove_node_good = ref{tlmgr remove [\@emph{option}...] \@emph{pkg}..., |
| 67 |
# |
| 68 |
install_node_bad = ref{tlmgr install [option...] pkg..., |
| 69 |
install_node_good = ref{tlmgr install [\@emph{option}...] \@emph{pkg}..., |
| 70 |
|
| 71 |
# we don't actually use the (autogenerated) -incl.texi file, |
| 72 |
# but it makes for a convenient target. |
| 73 |
|
| 74 |
# First make symlinks in build dir: |
| 75 |
Master = $(top_srcdir)/../../Master |
| 76 |
script-links: |
| 77 |
rm -f tlmgr.pl install-tl |
| 78 |
ln -s $(Master)/install-tl . |
| 79 |
ln -s $(Master)/texmf-dist/scripts/texlive/tlmgr.pl . |
| 80 |
|
| 81 |
$(mydoc)-incl.texi: install-tl tlmgr.pl |
| 82 |
$(pod2texi) -o $@ --subdir=$(mydoc)-incl $(pod2texi_args) $^ |
| 83 |
cp $(mydoc)-incl/tlmgr.texi $(mydoc)-incl/tlmgr.texi.orig |
| 84 |
perl -pi \ |
| 85 |
-e 's/\Q$(update_node_bad)\E/$(update_node_good)/' \ |
| 86 |
-e ';s/\Q$(update_node_bad2)\E/$(update_node_good2),/' \ |
| 87 |
-e ';' \ |
| 88 |
-e 's/\Q$(remove_node_bad)\E/$(remove_node_good)/' \ |
| 89 |
-e ';' \ |
| 90 |
-e 's/\Q$(install_node_bad)\E/$(install_node_good)/' \ |
| 91 |
$(mydoc)-incl/tlmgr.texi |
| 92 |
cp $(mydoc)-incl/tlmgr.texi $(srcdir)/$(mydoc)-incl/ |
| 93 |
cp $(mydoc)-incl/install-tl.texi $(srcdir)/$(mydoc)-incl/ |
| 94 |
.PHONY: $(mydoc)-incl.texi |