+* [Bug 1976] genLocInfo writes to srcdir break 'make distcheck'.
(4.2.7p196) 2011/07/27 Released by Harlan Stenn <stenn@ntp.org>
* DEFAULT INSTALLATION DIRECTORY CHANGES ON SOME OSes: to get the old
behavior, pass --with-locfile=legacy to 'configure'
* Move scripts/cvo.sh to sntp/scripts/cvo.sh .
* Move scripts/genLocInfo to sntp/scripts/genLocInfo .
* Give NTP_LOCINFO an optional path-to argument.
-* Remove hacks to get NTP_LOCINFO-related data to snmp/ .
+* Remove hacks to get NTP_LOCINFO-related data to sntp/ .
* Move sntp/include/mansec2subst.sed to sntp/scripts/mansec2subst.sed .
* If no "more specific" loc file is found for redhat* or fedora*,
look for a loc/redhat file.
AC_DEFUN([NTP_LOCINFO], [
-# NTP_LOCINFO: calling AC_ARG_WITH
+AC_MSG_CHECKING([for install dir and man conventions])
AC_ARG_WITH(
[locfile],
[with_locfile=legacy]
)
-AC_MSG_CHECKING([for installation directory, man sections, and man format])
-
-( cd $ac_abs_confdir/$1 && scripts/genLocInfo -f "$with_locfile" ) > genLocInfo.i 2>genLocInfo.err
+( SENTINEL_DIR="$PWD" && \
+ cd $srcdir/$1 && \
+ scripts/genLocInfo -f "$with_locfile" -d "$SENTINEL_DIR" ) > genLocInfo.i 2> genLocInfo.err
. ./genLocInfo.i
case "$GENLOCINFO" in
OK)
- AC_MSG_RESULT([found in $GENLOCINFOFILE])
+ AC_MSG_RESULT([in file $GENLOCINFOFILE])
rm genLocInfo.err genLocInfo.i
;;
- *) AC_MSG_ERROR([Problem with genLocInfo!])
+ *)
+ AC_MSG_RESULT([failed.])
+ AC_MSG_ERROR([Problem with genLocInfo!])
;;
esac
NULL=
-DISTCLEANFILES= config.log
-
EXTRA_DIST = \
cvo.sh \
genLocInfo \
mansec2subst.sed \
$(NULL)
-
#! /bin/sh
-args=`getopt f:v $*`
+args=`getopt d:f:v $*`
set -- $args
LF=
for i
do
case "$i" in
- -f) locfile="$2" ; shift ;;
+ -d) sdir="$2" ; shift 2 ;;
+ -f) locfile="$2" ; shift 2 ;;
-v) V= ; shift ;;
--) shift ; break ;;
esac
done
+case "$sdir" in
+ '')
+ sdir=.
+esac
+
case "$locfile" in
*/*)
LF=$locfile
###
-rm genLocInfo.rc?
+rm -f $sdir/genLocInfo.rc?
oIFS=$IFS
IFS=","
case "$x" in
'') ;;
*) echo "Unrecognized input: <$c,$d,$s,$x>" >&2
- touch genLocInfo.rc1
+ touch $sdir/genLocInfo.rc1
continue
;;
esac
*,libexec,*) DB= ; DL=libexec ; DS= ;;
*,sbin,*) DB= ; DL= ; DS=sbin ;;
*) echo "Unrecognized input: <$c,$d,$s>" >&2
- touch genLocInfo.rc1
+ touch $sdir/genLocInfo.rc1
continue
;;
esac
*,*,1M) ;;
*,*,8) ;;
*) echo "Unrecognized input: <$c,$d,$s>" >&2
- touch genLocInfo.rc1
+ touch $sdir/genLocInfo.rc1
continue
;;
esac
echo "${C}_DS=`eval echo '$'${C}_DS`"
echo "${C}_MS=`eval echo '$'${C}_MS`"
- touch genLocInfo.rc0
+ touch $sdir/genLocInfo.rc0
else
break
fi
done < $LF
IFS=$oIFS
-if test -f genLocInfo.rc1
+if test -f $sdir/genLocInfo.rc1
then
- rm genLocInfo.rc?
+ rm $sdir/genLocInfo.rc?
exit 1
fi
-if test -f genLocInfo.rc0
+if test -f $sdir/genLocInfo.rc0
then
- rm genLocInfo.rc?
+ rm $sdir/genLocInfo.rc?
echo 'GENLOCINFO=OK'
exit 0
fi