make build of PDF optional to avoid LaTeX dependency

Fixes #95.
This commit is contained in:
Adam Spiers 2024-09-08 14:51:58 +01:00
parent 70173b520d
commit 6d705e7046
4 changed files with 26 additions and 4 deletions

View file

@ -71,9 +71,15 @@ The steps in building Stow are:
to avoid a superfluous `use lib` line in your stow executable.
3. Type `perl Build.PL`.
3. If you have LaTeX and texinfo installed and want to build a PDF
version of the manual, type:
4. Type `./Build install` to install the various files. As noted
make pdf
4. Type `perl Build.PL`. If you skipped step 3 and see a warning
about `manual.pdf` being missing, you can safely ignore it.
5. Type `./Build install` to install the various files. As noted
above, this installs fewer files than the Autotools installation.
Basic Installation via Autotools
@ -105,6 +111,10 @@ The steps in building Stow are:
line into the generated stow script to ensure that it can always
locate the Perl modules without needing to manually set `PERL5LIB`.
4. If you have LaTeX and texinfo installed and want to build a PDF
version of the manual, type:
make pdf
Installation Names
------------------

View file

@ -22,7 +22,7 @@ PDF = doc/manual.pdf
HTML = doc/manual-single.html
dist_doc_DATA = \
README.md INSTALL.md \
$(PDF) $(HTML) doc/version.texi \
$(HTML) doc/version.texi \
ChangeLog doc/ChangeLog.OLD
# automake magic to define where *_DATA files get installed:
@ -97,7 +97,7 @@ $(TESTS_OUT):
CPAN_FILES = MANIFEST MANIFEST.SKIP Build.PL META.yml META.json
EXTRA_DIST = \
bin/stow.in bin/chkstow.in lib/Stow.pm.in lib/Stow/Util.pm.in \
doc/manual-split \
$(PDF) doc/manual-split \
$(TESTS) t/testutil.pm \
$(DEFAULT_IGNORE_LIST) \
$(CPAN_FILES)
@ -237,6 +237,8 @@ $(HTML): $(doc_deps)
-c USE_TITLEPAGE_FOR_TITLE=1 --no-split -o $@ \
`test -f 'doc/stow.texi' || echo '$(srcdir)/'`doc/stow.texi
pdf: $(PDF)
$(PDF): $(doc_deps)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \

9
NEWS
View file

@ -19,6 +19,15 @@ News file for Stow.
--target="$HOME/dir with space in/file with space in"
--ignore=\\$FOO\\$
*** Make dependency on LaTeX optional
Previously, the installation instructions always built a PDF
version of the manual, which required having LaTeX installed.
However LaTeX is a large program which can be awkward to install,
so this has now been made optional, and by default the PDF manual
is not part of the build. It can still be built via =make pdf=,
and this is documented.
*** Fix Docker builds.
Fix the return error 100 that was happening when trying to run

View file

@ -38,6 +38,7 @@ Release procedure
eval `perl -V:siteprefix`
automake --add-missing
./configure --prefix=$siteprefix && make
make pdf
(N.B. the CPAN distribution will contain these files, whereas
the GNU distribution will not.)