Discussion:
Request Option to Preserve .pdf and .html Texinfo Output
Paul Hardy
2018-07-13 20:46:10 UTC
Permalink
Dear Automake Maintainer(s);

Automake will build a .info file from Texinfo sources, and will leave
it in place with a "make clean" or "make distclean". The reasoning
given in the Automake manual is that a user should have the .info file
available without having to install packages to build it.

It would be nice to have that capability also apply to .pdf and .html
files produced from Texinfo sources. I was able to force that in a
way that does not comply with the API, which is why I am writing this
email in response to the section in Chapter 25 of the manual titled
"What is not in the API". Here is how I did it:

# Override removal of mypkg.html and mypkg.pdf
# that happens in clean-aminfo target
clean: clean-generic mostlyclean-am
-test -z "mypkg.dvi mypkg.ps" \
rm -rf mypkg.dvi mypkg.ps

So I redefine the "clean" target, because using a "clean-local"
definition would not override the "clean" target.

I can think of two possible ways to generate clean-aminfo differently:

1) If someone lists <mypkg>.html and/or <mypkg.pdf> in EXTRA_DIST
or some similar variable, then do not have the clean-aminfo target
remove them; or

2) Allow the user to define a variable such as "AM_TEXINFO_CLEAN"
that would override the default Automake assumption of removing *.pdf,
*.html, *.dvi, and *.ps [this might be easier to implement].

Alternatively, add the target "clean-aminfo" to the API.

I know that the GNU convention is only to preserve a .info file, not
.html or .pdf. But HTML and PDF files are removed even if a package
is declared as "foreign".

I tried this workaround using automake 1.15 and automake 1.16.1.

What are your thoughts on this?

Thank you,


Paul Hardy

Loading...