autoconf
[Top][All Lists]
Advanced

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

Re: Expansion of @libexecdir@ in .desktop.in file includes ${exec_prefix


From: Nick Bowler
Subject: Re: Expansion of @libexecdir@ in .desktop.in file includes ${exec_prefix}
Date: Mon, 18 Jan 2021 23:24:34 -0500

On 2021-01-18, Stefan Koch <stefan.koch10@gmail.com> wrote:
> The line:
> Exec=@libexecdir@/usbauth-notifier/usbauth-notifier
>
> from
> https://github.com/kochstefan/usbauth-all/blob/master/usbauth-notifier/data/usbauth-notifier.desktop.in
>
> will expanded to:
> Exec=${exec_prefix}/libexec/usbauth-notifier/usbauth-notifier
>
> But desktop-Files doesn't allow variables.
>
> Do you have an idea how to get the line expanded to:
> Exec=/usr/libexec/usbauth-notifier/usbauth-notifier
>
> without the ${exec_prefix} variable?

The normal way to do this is to perform the necessary substitutions in
make rules, as in make rules you can use make variables which will be
expanded correctly.

Alternately you could generate the entire file from a make rule which
might be reasonable for a small file like this.

This is the only way to make your package follow the GNU coding
standards, which says users must be able to override these variables
on the make command line.  For example:

  % ./configure
  % make install prefix=/some/where

is supposed to work.  So to make that happen, the rule of thumb is only
reference the installation variables in your makefiles.

Hope that helps,
  Nick



reply via email to

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