[Top][All Lists]

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

Re: make distcheck and the /etc dir

From: Daniel Leidert
Subject: Re: make distcheck and the /etc dir
Date: Mon, 04 Jun 2007 19:38:18 +0200

Am Montag, den 04.06.2007, 15:56 +0200 schrieb Jason Curl:
> Hello,
> I have a project where the program expects the configuration files to be 
> stored in '/etc/lx2005'. Appropriately, I've got such a
>    # for installing configuration data
>    etcdir=/etc/lx2005

This line misses a $(DESTDIR) to not break package builds and distcheck.

>    etc_DATA = serlog.conf
> The configuration that gets copied depends on the 'configure' script 
> setting the variable $(MACHINE).
> When I run 'make distcheck' it fails as it cannot install the files to 
> '/etc/lx2005'. I would very much like the location of the configuration 
> files to be independent of $(prefix) as the locations my project 
> searches are independent of where it was installed.

No problem: But you should add the DESTDIR variable to hardcoded paths.
If you use sysconfdir etc.pp, you don't need to add the DESTDIR variable

> Installing to my remote file system is easy enough and it works:
>    make DESTDIR="/mnt/remotefs" install

And the configuration file then is inside /etc and not /mnt/remotefs?
Why? And BTW: That should be done using --prefix=/mnt/remotefs
--sysconfdir=/etc and not DESTDIR (IMHO). DESTDIR is used e.g. for
creating packages (e.g. Debian packages). With your usage of this
variable, you break the possibility to package your software, because it
will try to write to /etc in every case.

> How can I get 'make distcheck' to work with this configuration? 
> Alternatively, I'm open for other ideas of implementation.

BTW: If you use


you can set


And if you want to make this the default, set it in your configure


However, you should carefully think about this. I personally would leave
it up to the user to choose a directory.

Regards, Daniel

reply via email to

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