NetBSD/dist/ntp/bootstrap

105 lines
2.4 KiB
Plaintext
Raw Normal View History

2007-01-06 19:04:26 +03:00
#! /bin/sh
2006-07-29 11:10:38 +04:00
# This "bootstrap" script performs various pre-autoreconf actions
# that are required after pulling fresh sources from the repository.
#
# NOTE: THE NTP VERSION NUMBER COMES FROM packageinfo.sh
#
# all other instances of it anywhere in the source base have propagated
# from this one source.
#
# To use the raw sources from the repository, you must have the following
# tools available to you:
#
# 1. Autoconf and Automake.
#
2007-01-06 19:04:26 +03:00
# 2. lynx. This is used to extract the COPYRIGHT file extracted from
# the html documentation.
#
# *** The following are no longer needed for simple builds from the repo
# 3. AutoGen. The repository does *not* contain the files generated from
2006-07-29 11:10:38 +04:00
# the option definition files and it does not contain the libopts
# tear-off/redistributable library.
#
2007-01-06 19:04:26 +03:00
# Note: AutoGen needs GNU Guile.
2006-07-29 11:10:38 +04:00
#
2007-01-06 19:04:26 +03:00
# 4. gunzip. The tear-off library is a gzipped tarball.
2006-07-29 11:10:38 +04:00
set -e
AUTORECONF=${AUTORECONF:-autoreconf}
scripts/genver
2007-01-06 19:04:26 +03:00
# 20060629: HMS: Let's try checking in libopts and the autogen-generated files
## The copy for ntp...
#rm -rf libopts*
#gunzip -c $(autoopts-config --libsrc) | (
# tar -xvf -
# mv libopts-*.*.* libopts )
2006-07-29 11:10:38 +04:00
2007-01-06 19:04:26 +03:00
## The copy for sntp...
2006-07-29 11:10:38 +04:00
#rm -rf sntp/libopts*
#gunzip -c $(autoopts-config --libsrc) | (
# cd sntp
# tar -xvf -
# mv libopts-*.*.* libopts )
2007-01-06 19:04:26 +03:00
def_files=`find [B-Za-z]* -type f -name '*.def' -print | fgrep -v /SCCS/`
prog_opt_files=`grep -l '^prog.name' $def_files`
2006-07-29 11:10:38 +04:00
2007-01-06 19:04:26 +03:00
## AutoGen stuff
#incdir=${PWD}/include
2006-07-29 11:10:38 +04:00
#for f in ${prog_opt_files}
#do
# ( cd $(dirname ${f})
# echo "Running autogen on $f..."
2007-01-06 19:04:26 +03:00
# autogen -L${incdir} $(basename ${f})
# ) || exit 1
2006-07-29 11:10:38 +04:00
#done
2007-01-06 19:04:26 +03:00
## Non-AutoGen stuff
for i in autogen-version.def version.def
do
cmp -s include/$i sntp/$i || cp -p include/$i sntp/$i
done
# touch the stuff generated by the opt files
for f in ${prog_opt_files}
do
f=`echo $f | sed -e 's/-opts.def//'`
l=
for i in `ls -1 $f*`
do
case "$i" in
*.c|*.h|*.1|*.texi|*.menu)
l="$l $i"
;;
esac
done
case "$l" in
'') ;;
*) touch $l
;;
esac
done
## EOAutoGen stuff
cp bincheck.mf sntp/
2006-07-29 11:10:38 +04:00
${AUTORECONF} -i -v
2007-01-06 19:04:26 +03:00
# HMS: 20060618: Now that we use separate copies of libopts
# we should only need the previous line.
#
## HMS: 20060615: the next line seems to be needed to make sure
## we get the correct srcdir path in sntp/libopts/Makefile.in
#rm -rf sntp/autom4te.cache
#
#(cd sntp && ${AUTORECONF} -f -i -v)