On Sunday May 31 2015 12:55, in comp.os.linux.development.apps, "Lew Pitcher"
<
lew.p...@digitalfreehold.ca> wrote:
> On Sunday May 31 2015 12:50, in comp.os.linux.development.apps, "Lew
> Pitcher" <
lew.p...@digitalfreehold.ca> wrote:
>
>> I have a home-grown app that I'd like to package up with GNU autotools
>> (automake/autoconf/libtool).
>>
>> My specific dilemma is that I have a number of shell scripts that the app
>> invokes, and I'd like these scripts to end up installed in the
>> <prefix>/libexec/<project> directory.
>>
>> I've read through the documentation on each command, the "Autotools book",
>> and the config files from various example (both real and contrived)
>> installations. From what I can find out, my target directory is named by
>> the autotools @libexecdir@ (for <prefix>/libexec) or (possibly) the
>> @pkglibexec@ variable.
>>
>> What I want to do is write my Makefile.in (or Makefile.am) to invoke the
>> GNU install program, so that the ultimate Makefile will "install" the
>> scripts in the appropriate directory
[snip]
>> Do I actually have to hand-expand the @libexec@ path manually in my
>> Makefile, or is there some way to get autoconf to process my Makefile.in to
>> properly and *completely* expand the variable when generating the target
>> Makefile?
>>
>> Any advice?
Here's the relevant part of the Makefile.in from my last test run, where I try
a number of variations, all in one makefile:
install: example.exit
echo install -o root -g bin -m 755 -d @libexecdir@/rmonitor
echo install -o root -g bin -m 755 -t @libexecdir@/rmonitor $?
echo install -o root -g bin -m 755 -d @prefix@/libexec/rmonitor
echo install -o root -g bin -m 755 -t @prefix@/libexec/rmonitor $?
echo
echo install -o root -g bin -m 755 -d ${libexecdir}/rmonitor
echo install -o root -g bin -m 755 -t ${libexecdir}/rmonitor $?
echo install -o root -g bin -m 755 -d ${exec_prefix}/libexec/rmonitor
echo install -o root -g bin -m 755 -t ${exec_prefix}/rmonitor $?
echo install -o root -g bin -m 755 -d ${prefix}/libexec/rmonitor
echo install -o root -g bin -m 755 -t ${prefix}/rmonitor $?
and, here's the resulting Makefile, after ./configure (defaulting all options)
install: example.exit
echo install -o root -g bin -m 755 -d ${exec_prefix}/libexec/rmonitor
echo install -o root -g bin -m 755 -t ${exec_prefix}/libexec/rmonitor $?
echo install -o root -g bin -m 755 -d /usr/local/libexec/rmonitor
echo install -o root -g bin -m 755 -t /usr/local/libexec/rmonitor $?
echo
echo install -o root -g bin -m 755 -d ${libexecdir}/rmonitor
echo install -o root -g bin -m 755 -t ${libexecdir}/rmonitor $?
echo install -o root -g bin -m 755 -d ${exec_prefix}/libexec/rmonitor
echo install -o root -g bin -m 755 -t ${exec_prefix}/rmonitor $?
echo install -o root -g bin -m 755 -d ${prefix}/libexec/rmonitor
echo install -o root -g bin -m 755 -t ${prefix}/rmonitor $?
The /only/ Makefile.in pattern that got the install directory completely
correct was the one where I /forced/ the issue, and manually specified the
install directory as @prefix@/libexec.
This seems counter to how autotools should work to me; I don't want rules that
depend on hardcoded paths - if the end-installer wants to run
./configure --libexecdir=/some/obscure/path
then, my Makefile.in shouldn't override that to assume @prefix@/libexec.