# DIST_HOOK_DIRS = conf html scripts ports
# HMS: Keep .gcc-warning first, as that way it gets printed first.
-BUILT_SOURCES = .gcc-warning
+BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version
+
+$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
+ ( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
+
+# HMS: The next bit is still suboptimal. If bk is present but this NTP
+# repo is not a bk repo, we'll get an error message from the prs command.
+# Unfortunately, I haven't found the necessary magic to redirect this error
+# output to /dev/null under ancient/unique shells like the one Ultrix uses.
+# We'll also get an error if srcdir or version is unwritable.
+$(srcdir)/version: FRC.version
+ -(bk version) >/dev/null 2>&1 && \
+ cd $(srcdir) && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ y=`cat version 2>/dev/null` || true && \
+ case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf
# To use the raw sources from the repository, you must have the following
# tools available to you:
#
-# 1. BitKeeper. Some of our version information is based on the BitKeeper
-# "prs" command.
+# 1. Autoconf and Automake.
#
# 2. AutoGen. The repository does *not* contain the files generated from
# the option definition files and it does not contain the libopts
#
# 5. bash, ksh, zsh or any POSIX compliant shell to run this script.
#
-version=4.2.0b
set -e
-if (bk version) >/dev/null 2>&1
-then
- bk_ver=$(
- test -d "${srcdir}" && cd ${srcdir}
- bk -R prs -hr+ -nd:I: ChangeSet )
- test -f version || touch version
- y=$(<version)
- case "${bk_ver}" in '' | "$y") ;; *) echo ${bk_ver} > version ;; esac
-else
- echo ${version} > version
- bk_ver=''
-fi
-
-( echo "This file is automatically generated from html/copyright.html"
- lynx -dump html/copyright.html
-) > COPYRIGHT.new
-mv COPYRIGHT.new COPYRIGHT
+. packageinfo.sh
rm -rf sntp/libopts*
gunzip -c $(autoopts-config --libsrc) | (