[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Noobie question
From: |
Ralf Wildenhues |
Subject: |
Re: Noobie question |
Date: |
Thu, 21 Sep 2006 18:17:06 +0200 |
User-agent: |
Mutt/1.5.13 (2006-09-01) |
Hello Douglas,
* Douglas Phillipson wrote on Thu, Sep 21, 2006 at 05:55:50PM CEST:
> I'm not sure if this is an automake or autoconf question. How do you
> get the GNU build system to install a file in a specific location. I.E.
> I want to install a config file in /etc when I do a make install. I
> understand that you use EXTRA_DIST for the build system to include an
> additional file in a distribution, but how do I make it install this
> file in /etc/ when doing "make install"?
You specify
sysconf_DATA = file
in your Makefile.am. That way it gets installed into $sysconfdir, which
defaults to $prefix/etc. Your user can now specify for example
./configure --prefix=/usr --sysconfdir=/etc
to install the file in /etc/file, and all other stuff below /usr.
(Mind you, overwriting files in a distribution can be dangerous! ;-)
If you want the file in a subdirectory of $sysconfdir, you can use for
example
pkgsysconfdir = $(sysconfdir)/@PACKAGE@
pkgsysconf_DATA = file
or, if you have a tree of files that should be installed with the same
structure, you can use something like
nobase_sysconf_DATA = subdir1/file1 subdir2/file2 file3
Much more about all this in
http://sources.redhat.com/automake/automake.html
Hope that helps.
Cheers,
Ralf
- Noobie question, Douglas Phillipson, 2006/09/21
- Re: Noobie question,
Ralf Wildenhues <=