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 via email to