bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image files not installed by "make install-html"


From: arnold
Subject: Re: Image files not installed by "make install-html"
Date: Sat, 25 Feb 2023 12:40:25 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

Are solutions 1 and 2 mutually exclusive? One for Info and one for HTML?
Can we do them both?

In terms of name conflicts, I like the idea of a subdirectory.

Arnold

Manuel Collado <mcollado2011@gmail.com> wrote:

> First findings:
>
> Graphical image files are useful for two document formats:
>
> -- .html, to be opened in a web browser.
> -- .info, to be opened by Emacs-GUI in info mode.
>
>
> 1.- Having images for .info documents is easy. Just put the following 
> lines into doc/Makefile.am:
>
> ----------
> html_images = api-figure1.png api-figure2.png api-figure3.png \
>       array-elements.png general-program.png process-flow.png \
>       statist.jpg
>
> imagedir = $(infodir)
> image_DATA = $(html_images)
> ----------
>
> The image files are installed by "make install" and removed by "make 
> uninstall".
>
> Caveat: the files are put in the global /usr/local/share/info along with 
> the .info documents, as required by the .texi sources. There is a 
> potential collision with image files with the same name from other 
> packages installed the same way. The solution could be to relocate the 
> images in a specific subdir (like doc/gawk-images/) and modify the .texi 
> files accordingly.
>
>
> 2.- A similar approach can be used to have images for .html documents:
>
> ----------
> html_images = api-figure1.png api-figure2.png api-figure3.png \
>       array-elements.png general-program.png process-flow.png \
>       statist.jpg
>
> html_DATA = $(html_images)
> ----------
>
> The only concern is that the images files are always installed by "make 
> install", even if the optional "make install-html" is not given. Of 
> course, "make uninstall" removes them.
>
> The target directory is specific: /usr/local/share/doc/gawk. No risk of 
> collision.
>
>
> 3.- A lower level solution for .html documentation is as follows:
>
> ----------
> html_images = api-figure1.png api-figure2.png api-figure3.png \
>       array-elements.png general-program.png process-flow.png \
>       statist.jpg
>
> install-html-local:
>       for p in '$(html_images)'; do \
>           $(INSTALL_DATA) $$p "$(DESTDIR)$(htmldir)" || exit $$?; \
>       done;
> ----------
>
> Now the image files are not installed by "make install", but only by the 
> optional "make install-html". Regrettably, they are not removed by "make 
> uninstall". Please note that automake seems to have no support for 
> uninstall-html.
>
>
> Please suggest which approaches are acceptable. I'm ready to submit 
> temptative patches. I will vote for 1.- and 2.-, even if they are not 
> perfect.
>
> Regards,
> Manuel
>
> El 21/2/23 a las 19:13, Andrew J. Schorr escribió:
> > Hi Manuel,
> > 
> > On Tue, Feb 21, 2023 at 06:10:45PM +0100, Manuel Collado wrote:
> >>> So I don't think it's a mistake on your side. I don't know how
> >>> to fix this. As far as I can tell, that "HTMLS" list is generated
> >>> by automake...
> >>
> >> I also think so. The cure could be to patch doc/Makefile.am
> >> following the approach of gawk-xml. I could eventually provide a
> >> temptative patch.
> > 
> > That sounds like the right approach.
> > 
> > Regards,
> > Andy
>
> -- 
> Manuel Collado - http://mcollado.z15.es



reply via email to

[Prev in Thread] Current Thread [Next in Thread]