Discussion:
How to move aminfo-results (PDF/HTML) from clean-aminfo to maintainer-clean-aminfo?
Simon Sobisch
2018-02-16 14:11:03 UTC
Permalink
GnuCOBOL includes the manual in both info and PDF formats in its
tarballs, but the PDF is removed on `make clean`.

This is the main part of doc/Makefile.am:

_________________________________________

info_TEXINFOS = gnucobol.texi
gnucobol_TEXINFOS = fdl.texi
EXTRA_DIST = gnucobol.pdf
AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
CLEANFILES = *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.vrs
TEXI2DVI = texi2dvi -I $(srcdir)
_________________________________________

This is the current behavior:

* `make dist` creates .info and .pdf, both are included in the
tarball
* `make clean` removes .pdf
* `make maintainer-clean` removes .info

Therefore the purpose of EXTRA_DIST "the user doesn't need to have the
tools installed to create the file"
only works as long as he doesn't call `make clean`.

I've checked the generated Makefile.in and indeed it has

clean-aminfo:
-test -z "gnucobol.dvi gnucobol.pdf gnucobol.ps gnucobol.html" \
|| rm -rf gnucobol.dvi


Is there an option to move gnucobol.pdf (and ideally gnucobol.html,
too) from clean-aminfo to maintainer-clean-aminfo?

Thank you for providing helpful notes,
Simon
Mathieu Lirzin
2018-06-21 22:34:15 UTC
Permalink
Hello Simon,
Post by Simon Sobisch
GnuCOBOL includes the manual in both info and PDF formats in its
tarballs, but the PDF is removed on `make clean`.
_________________________________________
info_TEXINFOS = gnucobol.texi
gnucobol_TEXINFOS = fdl.texi
EXTRA_DIST = gnucobol.pdf
AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
CLEANFILES = *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.vrs
TEXI2DVI = texi2dvi -I $(srcdir)
_________________________________________
* `make dist` creates .info and .pdf, both are included in the
tarball
* `make clean` removes .pdf
* `make maintainer-clean` removes .info
Therefore the purpose of EXTRA_DIST "the user doesn't need to have the
tools installed to create the file"
only works as long as he doesn't call `make clean`.
I've checked the generated Makefile.in and indeed it has
-test -z "gnucobol.dvi gnucobol.pdf gnucobol.ps gnucobol.html" \
|| rm -rf gnucobol.dvi
Is there an option to move gnucobol.pdf (and ideally gnucobol.html,
too) from clean-aminfo to maintainer-clean-aminfo?
Automake assumes that only info files are distributed as stated by
Automake manual [1]. This is the reason why only info files are built
in ‘srcdir’ and not the other formats.

While IMO it would be nice to support distribution of arbitrary
documentation output formats, I would expect such feature to be far from
trivial to implement.

The strategy of checking ‘EXTRA_DIST’ for matching file names
corresponding to distributed format seems a nice workaround, however it
would need more consideration regarding the potential issues this
solution might bring (in particular the ‘srcdir’ thing).

So What I recommend for now would be for GNUCobol to not distribute PDF
file for the sake of simplicity and robustness. On the Automake side
what seems appropriate for such issue is to open a “wishlist” bug.

WDYT?

[1] https://www.gnu.org/software/automake/manual/html_node/Texinfo.html
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Loading...