automake
[Top][All Lists]
Advanced

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

Re: AC_SUBST'ing foodir correctly?


From: Mathieu Lirzin
Subject: Re: AC_SUBST'ing foodir correctly?
Date: Mon, 30 May 2016 16:48:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Wouter Verhelst <address@hidden> writes:

> On Tue, May 24, 2016 at 06:11:47PM +0200, Mathieu Lirzin wrote:
>> 
>> ‘systemdsystemunitdir’ seems not affected by DESTDIR because IIUC
>> PKG_CHECK_VAR set it to something like "/lib/systemd/system" instead of
>> "${libdir}/systemd/system".
>> 
>> I suppose it would work better to define it manually like
>> this:
>> 
>>   if SYSTEMD
>>     systemdunitdir = $(libdir)/systemd/system
>>     systemdunit_DATA = address@hidden
>>   endif
>
> Well. That would work, yes, but it wouldn't work *better*. The whole
> point is that I do not want to hardcode such things, so that if a user
> installs systemd units in </usr/local/brokenstuff/systemd> and the
> pkg-config files are where they need to be, everything works as expected.

You are right, that would be better.  My understanding is that
pkg-config files are supposed to define variables in terms of 'prefix'
as described in pkg-config(1)

--8<---------------cut here---------------start------------->8---
  prefix=/home/hp/unst   # this defines a variable
  exec_prefix=${prefix}  # defining another variable in terms of the first
  libdir=${exec_prefix}/lib
  includedir=${prefix}/include
--8<---------------cut here---------------end--------------->8---

but “systemd.pc” isn't doing that.

> I was under the impression that automake looks at DESTDIR for every
> foodir it looks at, but apparently that's not the case then? That seems
> broken; after all, I don't think a staging directory should depend on
> whether or not something was part of a given prefix. Is there any
> explanation available somewhere on why this behaviour occurs? Would a
> patch that changes this behaviour be acceptable?

Every default installation directories are expected to be subdirectories
of the 'prefix' variable.  This is verified by ‘make distcheck’ and
specified in GNU coding standards:

  
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables

So it is unlikely that a patch is going to be accepted in Automake.
However I guess the default pkg-config file could be fixed in Systemd.

Thanks,

-- 
Mathieu Lirzin



reply via email to

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