installing info files

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

installing info files

Patrick Alken
Hello,

  I have a .info file (not generated by texinfo) and would like it to be
installed under 'make install'. I tried adding it like this:

info_DATA = file.info

but this gives the following error:

doc/Makefile.am:7: error: 'infodir' is not a legitimate directory for 'DATA'

My current solution, which works is this:

------------------
EXTRA_DIST = file.info

install-data-local: file.info
    ${INSTALL} file.info ${infodir}
------------------

This works but probably isn't the proper solution. Can anyone tell me
how to correctly install a .info file which isn't generated from a
.texinfo source?

Thanks,
Patrick

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installing info files

Peter Johansson-6
Hi Patrick,


On 5/21/2017 5:16 PM, Patrick Alken wrote:

> Hello,
>
>    I have a .info file (not generated by texinfo) and would like it to be
> installed under 'make install'. I tried adding it like this:
>
> info_DATA = file.info
>
> but this gives the following error:
>
> doc/Makefile.am:7: error: 'infodir' is not a legitimate directory for 'DATA'
>
> My current solution, which works is this:
>
> ------------------
> EXTRA_DIST = file.info
>
> install-data-local: file.info
>      ${INSTALL} file.info ${infodir}
> ------------------

I don't know how to do this "automakially", but I would modify the rule
above to

install-data-local: file.info
     ${INSTALL_DATA} file.info $(DESTDIR)${infodir}

where I 1) use INSTALL_DATA which default sets permission -m 644 and 2)
use DESTDIR variable to allow for staged installation
(https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html#DESTDIR)

I think 'make distcheck' at least is checking that 2) works, so I
suspect 'distcheck fails' with your current rule.

Cheers,
Peter


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installing info files

Patrick Alken
On 06/03/2017 04:08 AM, Peter Johansson wrote:

>
> I don't know how to do this "automakially", but I would modify the
> rule above to
>
> install-data-local: file.info
>     ${INSTALL_DATA} file.info $(DESTDIR)${infodir}
>
> where I 1) use INSTALL_DATA which default sets permission -m 644 and
> 2) use DESTDIR variable to allow for staged installation
> (https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html#DESTDIR)
>
> I think 'make distcheck' at least is checking that 2) works, so I
> suspect 'distcheck fails' with your current rule.
>
> Cheers,
> Peter
>
Hi Peter,

  Yes make distcheck is in fact failing (even with your modification).
The error is:

/bin/install -c -m 644 file.info
/data/palken/package/package-1.0+/_inst/share/info
/bin/install: cannot stat ‘file.info’: No such file or directory

The file.info is being included with the dist archive because of the
EXTRA_DIST, however it is not being located for the installation.

Do I need to also prefix the "file.info" in that install-data-local rule
with some directory variable?

Thanks,

Patrick


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: installing info files

Peter Johansson-6
Hi Patrick,


On 6/3/2017 5:26 PM, Patrick Alken wrote:
> Hi Peter,
>    Yes make distcheck is in fact failing (even with your modification).
> The error is:
>
> /bin/install -c -m 644 file.info
> /data/palken/package/package-1.0+/_inst/share/info
> /bin/install: cannot stat ‘file.info’: No such file or directory

Hard to say without seeing the context, but it might be that you need to
prefix the file with $(srcdir)

install-data-local: $(srcdir)/file.info
     ${INSTALL_DATA} $(srcdir)/file.info $(DESTDIR)${infodir}

Cheers,
Peter

Loading...