Annotation of embedaddon/ntp/bootstrap, revision 1.1

1.1     ! misho       1: #! /bin/sh
        !             2: 
        !             3: #  This "bootstrap" script performs various pre-autoreconf actions
        !             4: #  that are required after pulling fresh sources from the repository.
        !             5: #
        !             6: #  --force is supported and will be passed to autoreconf
        !             7: #
        !             8: #  NOTE:  THE NTP VERSION NUMBER COMES FROM packageinfo.sh
        !             9: #
        !            10: #  all other instances of it anywhere in the source base have propagated
        !            11: #  from this one source.
        !            12: #
        !            13: #  To use the raw sources from the repository, you must have the following
        !            14: #  tools available to you:
        !            15: #
        !            16: #  1.  Autoconf and Automake.
        !            17: #
        !            18: #  2.  lynx.  This is used to extract the COPYRIGHT file extracted from
        !            19: #      the html documentation.
        !            20: #
        !            21: #  *** The following are no longer needed for simple builds from the repo
        !            22: #  3.  AutoGen.  The repository does *not* contain the files generated from
        !            23: #      the option definition files and it does not contain the libopts
        !            24: #      tear-off/redistributable library.
        !            25: #
        !            26: #      Note: AutoGen needs GNU Guile.
        !            27: #
        !            28: #  4.  gunzip.  The tear-off library is a gzipped tarball.
        !            29: 
        !            30: set -e
        !            31: 
        !            32: scripts/genver || { echo scripts/genver failed ; exit 1; }
        !            33: 
        !            34: # autoreconf says:
        !            35: # The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
        !            36: # AUTOPOINT, LIBTOOLIZE, M4 are honored.
        !            37: 
        !            38: AUTORECONF=${AUTORECONF:-autoreconf}
        !            39: 
        !            40: case `hostname` in
        !            41:  pogo.udel.edu)
        !            42:     if fgrep -q 4.2.4 version.m4; then
        !            43:        AUTOCONF=autoconf-2.59
        !            44:        AUTOHEADER=autoheader-2.59
        !            45:        AUTOMAKE=automake-1.9
        !            46:        ACLOCAL=aclocal-1.9
        !            47:        export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
        !            48:     fi
        !            49:     ;;
        !            50: esac
        !            51: 
        !            52: # 20060629: HMS: Let's try checking in libopts and the autogen-generated files
        !            53: ## The copy for ntp...
        !            54: #rm -rf libopts*
        !            55: #gunzip -c $(autoopts-config --libsrc) | (
        !            56: #  tar -xvf -
        !            57: #  mv libopts-*.*.* libopts )
        !            58: 
        !            59: ## The copy for sntp...
        !            60: #rm -rf sntp/libopts*
        !            61: #gunzip -c $(autoopts-config --libsrc) | (
        !            62: #  cd sntp
        !            63: #  tar -xvf -
        !            64: #  mv libopts-*.*.* libopts )
        !            65: 
        !            66: def_files=`find [B-Za-z]* -type f -name '*.def' -print | fgrep -v /SCCS/`
        !            67: prog_opt_files=`grep -l '^prog.name' $def_files`
        !            68: 
        !            69: ## AutoGen stuff
        !            70: 
        !            71: #incdir=${PWD}/include
        !            72: 
        !            73: #for f in ${prog_opt_files}
        !            74: #do
        !            75: #  ( cd $(dirname ${f})
        !            76: #    echo "Running autogen on $f..."
        !            77: #    autogen -L${incdir} $(basename ${f})
        !            78: #  ) || exit 1
        !            79: #done
        !            80: 
        !            81: ## Non-AutoGen stuff
        !            82: 
        !            83: for i in autogen-version.def version.def version.texi
        !            84: do
        !            85:     cmp -s include/$i sntp/$i || cp -fp include/$i sntp/$i
        !            86: done
        !            87: 
        !            88: # touch the stuff generated by the opt files
        !            89: 
        !            90: for f in ${prog_opt_files}
        !            91: do
        !            92:     f=`echo $f | sed -e 's/-opts.def//'`
        !            93:     l=
        !            94:     lh=
        !            95:     for i in `ls -1 $f*`
        !            96:     do
        !            97:        case "$i" in
        !            98:         *.c|*.h|*.1|*.texi|*.menu)
        !            99:            l="$l $i"
        !           100:            ;;
        !           101:         *.html)
        !           102:            lh="$lh $i"
        !           103:            ;;
        !           104:        esac
        !           105:     done
        !           106:     case "$l:$lh" in
        !           107:      ':') ;;
        !           108:      *) touch $l $lh
        !           109:        ;;
        !           110:     esac
        !           111: done
        !           112: 
        !           113: ## EOAutoGen stuff
        !           114: 
        !           115: # Yacc/bison files ntp_parser.[ch] so we don't require the tool if
        !           116: # ntp_parser.y hasn't been updated.  At the same time, keyword-gen-utd
        !           117: # and ntp_keyword.h which are derived from ntp_parser.h and
        !           118: # keyword-gen.c.
        !           119: 
        !           120: touch ntpd/ntp_parser.[ch] ntpd/keyword-gen-utd ntpd/ntp_keyword.h
        !           121: 
        !           122: cp bincheck.mf sntp/
        !           123: cp depsver.mf sntp/
        !           124: 
        !           125: ${AUTORECONF} -i -v --no-recursive "$@"
        !           126: 
        !           127: # DH: 20101120: We are back to a single copy of libopts, and
        !           128: # once again it seems we need to run autoreconf in sntp after
        !           129: # the top-level run to get a correct sntp/libopts/Makefile.in.
        !           130: # To reduce redundancy, the top-level autoreconf uses --no-recursive.
        !           131: #
        !           132: # HMS: 20060618: Now that we use separate copies of libopts
        !           133: # we should only need the previous line.
        !           134: #
        !           135: ## HMS: 20060615: the next line seems to be needed to make sure
        !           136: ## we get the correct srcdir path in sntp/libopts/Makefile.in
        !           137: #rm -rf sntp/autom4te.cache
        !           138: #
        !           139: (cd sntp && ${AUTORECONF} -i -v "$@")

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>