[Top][All Lists]

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

Re: [Nano-devel] some build stuff

From: Benno Schulenberg
Subject: Re: [Nano-devel] some build stuff
Date: Mon, 16 Jun 2014 16:54:34 +0200

On Mon, Jun 16, 2014, at 9:03, Mike Frysinger wrote:
> On Thu 05 Jun 2014 22:43:00 Benno Schulenberg wrote:
> > In the man pages and in the info document there a few references to
> > SYSCONFDIR/nanorc.  I find this ugly -- SYSCONFDIR is not something
> > that the user should know.  Ideally it would get replaced at build
> > time by /etc (or whatever $sysconfdir has been set to at that time).
> > How to go about this?
> well, here's the fun part ... those paths (by design) aren't known until 
> `make` time.  you can't sanely expand them at configure time.
> your best bet probably would be to add an install hook that'd run sed on the 
> files and replace SYSCONFDIR with $(sysconfdir) (or whatever the variable is 
> named).

Oww... what a complication, having to do this separately for
$(man1dir), $(man5dir), $(htmldir), $(infodir)...  Isn't there
a way to tell install to filter each file before installation?

Hmmm...  It seems there is!  After adding these two lines to

INSTALL = install -s --strip-program=../sedscript
export SISSICONF=$(sysconfdir)

and putting in a doc/sedscript file this:

sed -i "s:SYSCONFDIR:${SISSICONF}:" $1

doing an installation works beautifully.

Now the question... is this sane?  Portable?  Acceptable?


-- - Access your email from home and the web

reply via email to

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