On Mon, 2009-06-29 at 17:17 +0200, Jim Meyering wrote:
> Fabio M. Di Nitto wrote:
> ...
> >> > Handling of prefix can be better I agree, but turning them into
> >> > sbin_PROGRAM doesn't work either.
> >> >
> >> > Clearly I am open to any better solution than the one I have in place...
> >>
> >> Sure.
> >> There's already so much default-munging going on in configure.ac,
> >> why not add a tiny bit more.
> >>
> >> This incremental patch does what you seem to want:
> >>
> >> In case we're using the default (/usr) prefix
> >> and the default exec_prefix, and set sbindir to /sbin:
> >>
> >> diff --git a/configure.ac b/configure.ac
> >> index a568463..ca0301e 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -38,6 +38,7 @@ fi
> >>
> >> case $exec_prefix in
> >> NONE) exec_prefix=$prefix;;
> >> + test "$prefix:$sbindir" = '/usr:${exec_prefix}/sbin' &&
> >> sbindir=/sbin
> >> prefix) exec_prefix=$prefix;;
> >> esac
> >
> > hmmmm... wouldn't that move all sbin_PROGRAMS to /sbin (assuming we are
> > doing default build)? If so that's still not ideal because except those
> > 3 binaries, all the others can go (and should go) in /usr/sbin as they
> > are not vital for the FS operations.
>
> Good catch. I see, now.
>
> The following incremental patch finally seems to do the right thing:
>
> - with --prefix=P where P!=/usr: no change
> - with no --prefix option, or with --prefix=/usr, install those three
> subdirs' tools into /sbin rather than into /usr/sbin.
Signed-off-by: Fabio M. Di Nitto <[email protected]>
push at will ;)
Thanks!
Fabio