nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] some build stuff


From: Mike Frysinger
Subject: Re: [Nano-devel] some build stuff
Date: Mon, 16 Jun 2014 14:08:09 -0400
User-agent: KMail/4.13.1 (Linux/3.14.2; KDE/4.13.1; x86_64; ; )

On Mon 16 Jun 2014 13:33:15 Mike Frysinger wrote:
> On Mon 16 Jun 2014 08:27:35 Eitan Adler wrote:
> > On 16 June 2014 07:54, Benno Schulenberg wrote:
> > > 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
> > > doc/man/Makefile.am:
> > > 
> > > INSTALL = install -s --strip-program=../sedscript
> > > export SISSICONF=$(sysconfdir)
> > > 
> > > and putting in a doc/sedscript file this:
> > > 
> > > #!/bin/sh
> > > sed -i "s:SYSCONFDIR:${SISSICONF}:" $1
> > > 
> > > doing an installation works beautifully.
> > > 
> > > Now the question... is this sane?  Portable?  Acceptable?
> > 
> > Very much not portable.
> 
> to be clear, the current sed invocation is not portable, but it is feasible
> to make it so.

well, mucking with INSTALL is also not portable.  i thought you were 
suggesting something else the first time i read it.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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