[Top][All Lists]

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

Re: Working in "real-life" or with "distcheck" but not both?

From: Russ Allbery
Subject: Re: Working in "real-life" or with "distcheck" but not both?
Date: Sun, 29 Dec 2013 21:01:43 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Johan Persson <address@hidden> writes:

> As part of the installation of a project I'm working on I want to
> install a systemd service file which is created as part of the
> configuration process (by autoconf).

> Now I found myself in the situation where I can choose to have this work
> either in real life or when I make "make distcheck" but not both.

Have you seen the discussion of this in daemon(7)?  It provides a working
example that addresses exactly this situation, although it does rely on
using the pkg.m4 Autoconf macros from pkg-config.

The basic idea is that you default to this:

> My problem is that me trying to install the service in an absolute
> system directory as

> $(INSTALL) -m 644 ${systemd_service} ${DESTDIR}/usr/lib/systemd/system 

> will not work with distcheck since it requires the use of ${prefix} in
> order for the temporary install/check to work.

except pulling the actual directory from the pkg-config configuration for
systemd (for example, it may be /lib, not /usr/lib, on, e.g., Debian), and
then you override the directory with a --with flag in for use
with distcheck.

The documentation and the Autoconf code is in "Installing Systemd Service
Files" in daemon(7).

Russ Allbery (address@hidden)              <>

reply via email to

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