Where to install a daemon

2001-01-16 Thread Bill Segall

As part of my package I want to install a daemon and I have three
reasonable places to install int which are bin, sbin and libexec. On a
Linux system sbin seems like the natural place but on *BSD libexec is
natural. I was trying to find out how to make this choice based on
architecture but I'll confess to be begin stumped - any suggestions or is
this simply impossible? By default I'm installing it in bin but I'm not
really happy :-)

foo_PROGRAMS seems to differ in this respect to sysconf_DATA. foo is one of
a possible set so that we end up with $(foodir) where these are the name of
the directory but $(sysconfdir) is on at least these two hosts mapped to
etc and I guess it's this mapping step that I'm missing.

Does it make sense to have some extra name (sysbin?) that could
platform-specifically map to the appropriate directory. I'd be happy to
generate a patch if this was regarded as useful.

Apologies if this has been asked before. I've read some doc and scanned the
mailing lists to no avail.

Thanks,
Bill.




Another problem with BSD Make

2001-01-16 Thread Derek R. Price

It seems some BSD makes don't look through VPATH for targets either
(i.e. when they're not found in $(builddir) make assumes they are
missing and rebuilds).

Mostly this isn't a problem, but there are a few cases where it is.  For
example, info targets are rebuilt every time and I can't create a
*_TEXINFOS dependency that works from outside $(srcdir) for both a build
and a make dist without extra configure work.

The following configure.in code will discover if the bug is present and
set an AUTOMAKE conditional switch based on that:

# BSD's logo is a devil for a reason, hey?
AC_CACHE_CHECK(for BSD VPATH bug in make, ccvs_cv_bsd_make_vpath_bug,
[if test ! -d ac_test_dir ; then
AC_TRY_COMMAND([mkdir ac_test_dir])
fi
cat conftestmake EOF
VPATH = ac_test_dir
ac_test_target: ac_test_dep
echo BSD VPATH bug present 2
ac_test_dep: ac_test_dep_dep
EOF
touch ac_test_dir/ac_test_dep_dep
touch ac_test_dir/ac_test_dep
touch ac_test_target
# Don't know why, but the following test doesn't work under FreeBSD 4.2
# without this sleep command
sleep 1
if AC_TRY_COMMAND([make -f conftestmake 21 /dev/null
|grep ^BSD\ VPATH\ bug\ present\$ /dev/null]) ; then
ccvs_cv_bsd_make_vpath_bug=yes
else
ccvs_cv_bsd_make_vpath_bug=no
fi
AC_TRY_COMMAND([rm -rf ac_test_dir ac_test_target conftestmake])])
# We also don't need to worry about the bug when $srcdir = $builddir
AM_CONDITIONAL(MAKE_TARGETS_IN_VPATH, \
test $ccvs_cv_bsd_make_vpath_bug = no \
|| test $srcdir = .)



I used the above test to create a conditional target for my *_TEXINFOS,
but there's nothing I can do about the info_TEXINFOS targets without
sticking my fingers into the automake code again.

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
#! perl
@a = ( 0x2E805,0x6B39,0x15B3,0x45993,0x153C,0x1D9F );
for ( @a ) { ( $s, $i )=( 'a', 0 ); $s++ while $i++  $_; print "$s" }







Re: Package support (RPM, deb, pkg, kits, etc.)

2001-01-16 Thread Derek R. Price

Tom Tromey wrote:

 The idea behind DOCUMENTATION is to provide a way to install README
 and the other stuff that ends up (eg) in /usr/doc/$PACKAGE.

Just a note, I believe the RedHat standard is /usr/share/doc now.

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
There is not a truth existing which I fear or would wish unknown to the whole
world.
- Thomas Jefferson to Henry Lee, 1826