automake
[Top][All Lists]
Advanced

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

Re: dirstamp and other mysteries


From: Stefano Lattarini
Subject: Re: dirstamp and other mysteries
Date: Thu, 1 Dec 2011 13:28:16 +0100
User-agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; )

On Tuesday 29 November 2011, Adam Spiers wrote:
> Hi all,
>
Hi Adam, and sorry for the delay in my reply.

> I've been tearing my hair out over this one.  I have a manual file
> called doc/stow.texi.  I want my release tarball to contain
> pre-generated Info, HTML and PDF versions of the manual so that end
> users don't need texinfo installed.  I want `make install' to put:
> 
>   - the Info version to $(infodir)/stow.info
> 
>   - the HTML version to $(docdir)/manual.html
> 
>   - the PDF version to $(docdir)/manual.pdf
> 
> and of course I want `make distcheck' to succeed and build my
> tarballs.
> 
> This seems to go against the automake grain, where the auto-generated
> rules assume that if you have a file foo.texi, you'll want to generate
> foo.html and foo.pdf.  However, I don't want that, because
> 
>     $(prefix)/share/doc/stow/manual.html
> 
> is a much more self-explanatory pathname for end users than
> 
>     $(prefix)/share/doc/stow/stow.html
> 
> and ditto for the PDF.
> 
IMHO the correct (and certainly most simple) thing to do in this
situation would be to provide an install-hook that either:

  1. add proper symlinks to the installed docs, so that they are
     available also the name you desire; or
  2. rename the docs after the install, so that the are available
     *only* by the name you desire;

i.e, for the first case, something like this (untested!):

  install-data-hook:
        cd $(DESTDIR)$(docdir) && $(LN_S) stow.html manual.html
  uninstall-hook:
        rm -f $(DESTDIR)$(docdir)/manual.html

or, for the second case, something like this (untested as well!):

  install-data-hook:
        cd $(DESTDIR)$(docdir) && mv -f stow.html manual.html
  uninstall-hook:
        rm -f $(DESTDIR)$(docdir)/manual.html
HTH,
  Stefano



reply via email to

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