Discussion:
installing info files
Patrick Alken
2017-05-21 07:16:07 UTC
Permalink
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
Peter Johansson
2017-06-03 02:08:09 UTC
Permalink
Hi Patrick,
Post by Patrick Alken
Hello,
I have a .info file (not generated by texinfo) and would like it to be
info_DATA = file.info
doc/Makefile.am:7: error: 'infodir' is not a legitimate directory for 'DATA'
------------------
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
Patrick Alken
2017-06-03 07:26:45 UTC
Permalink
Post by Peter Johansson
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
Peter Johansson
2017-06-09 23:36:39 UTC
Permalink
Hi Patrick,
Post by Patrick Alken
Hi Peter,
Yes make distcheck is in fact failing (even with your modification).
/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...