Skip to content

Commit

Permalink
Merge pull request #117 from aspiers/optional-pdf-build
Browse files Browse the repository at this point in the history
  • Loading branch information
aspiers authored Sep 8, 2024
2 parents 01a836a + 6d705e7 commit 64587ba
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 13 deletions.
32 changes: 23 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -105,13 +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. You can remove the generated files from the source code directory
by typing `make clean`. To also remove the files that `configure`
created (so you can compile the package for a different computer),
type `make distclean`. There is also a `make maintainer-clean`
target, but that is intended mainly for stow's developers. If you
use it, you may have to get all sorts of other programs in order
to regenerate files that came with the distribution.
4. If you have LaTeX and texinfo installed and want to build a PDF
version of the manual, type:

make pdf

Installation Names
------------------
Expand Down Expand Up @@ -193,6 +196,17 @@ operates.

`configure` also accepts some other, not widely useful, options.

Cleaning up build files
-----------------------

You can remove the generated files from the source code directory by
typing `make clean`. To also remove the files that `configure`
created (so you can compile the package for a different computer),
type `make distclean`. There is also a `make maintainer-clean`
target, but that is intended mainly for stow's developers. If you use
it, you may have to get all sorts of other programs in order to
regenerate files that came with the distribution.

License for this file
---------------------

Expand Down
6 changes: 4 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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' \
Expand Down
9 changes: 9 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.71.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
[m4_warning([this file was generated for autoconf 2.72.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
Expand Down
1 change: 1 addition & 0 deletions doc/HOWTO-RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down

0 comments on commit 64587ba

Please sign in to comment.