/contrib/ntp/bootstrap

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 120 lines · 40 code · 20 blank · 60 comment · 5 complexity · c02e9b9bc44252dee985c1a7bc072561 MD5 · raw file

  1. #! /bin/sh
  2. # This "bootstrap" script performs various pre-autoreconf actions
  3. # that are required after pulling fresh sources from the repository.
  4. #
  5. # NOTE: THE NTP VERSION NUMBER COMES FROM packageinfo.sh
  6. #
  7. # all other instances of it anywhere in the source base have propagated
  8. # from this one source.
  9. #
  10. # To use the raw sources from the repository, you must have the following
  11. # tools available to you:
  12. #
  13. # 1. Autoconf and Automake.
  14. #
  15. # 2. lynx. This is used to extract the COPYRIGHT file extracted from
  16. # the html documentation.
  17. #
  18. # *** The following are no longer needed for simple builds from the repo
  19. # 3. AutoGen. The repository does *not* contain the files generated from
  20. # the option definition files and it does not contain the libopts
  21. # tear-off/redistributable library.
  22. #
  23. # Note: AutoGen needs GNU Guile.
  24. #
  25. # 4. gunzip. The tear-off library is a gzipped tarball.
  26. set -e
  27. scripts/genver
  28. # autoreconf says:
  29. # The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
  30. # AUTOPOINT, LIBTOOLIZE, M4 are honored.
  31. AUTORECONF=${AUTORECONF:-autoreconf}
  32. case `hostname` in
  33. pogo.udel.edu)
  34. if fgrep -q 4.2.4 version.m4; then
  35. AUTOCONF=autoconf-2.59
  36. AUTOHEADER=autoheader-2.59
  37. AUTOMAKE=automake-1.9
  38. ACLOCAL=aclocal-1.9
  39. export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
  40. fi
  41. ;;
  42. esac
  43. # 20060629: HMS: Let's try checking in libopts and the autogen-generated files
  44. ## The copy for ntp...
  45. #rm -rf libopts*
  46. #gunzip -c $(autoopts-config --libsrc) | (
  47. # tar -xvf -
  48. # mv libopts-*.*.* libopts )
  49. ## The copy for sntp...
  50. #rm -rf sntp/libopts*
  51. #gunzip -c $(autoopts-config --libsrc) | (
  52. # cd sntp
  53. # tar -xvf -
  54. # mv libopts-*.*.* libopts )
  55. def_files=`find [B-Za-z]* -type f -name '*.def' -print | fgrep -v /SCCS/`
  56. prog_opt_files=`grep -l '^prog.name' $def_files`
  57. ## AutoGen stuff
  58. #incdir=${PWD}/include
  59. #for f in ${prog_opt_files}
  60. #do
  61. # ( cd $(dirname ${f})
  62. # echo "Running autogen on $f..."
  63. # autogen -L${incdir} $(basename ${f})
  64. # ) || exit 1
  65. #done
  66. ## Non-AutoGen stuff
  67. for i in autogen-version.def version.def
  68. do
  69. cmp -s include/$i sntp/$i || cp -p include/$i sntp/$i
  70. done
  71. # touch the stuff generated by the opt files
  72. for f in ${prog_opt_files}
  73. do
  74. f=`echo $f | sed -e 's/-opts.def//'`
  75. l=
  76. for i in `ls -1 $f*`
  77. do
  78. case "$i" in
  79. *.c|*.h|*.1|*.texi|*.menu)
  80. l="$l $i"
  81. ;;
  82. esac
  83. done
  84. case "$l" in
  85. '') ;;
  86. *) touch $l
  87. ;;
  88. esac
  89. done
  90. ## EOAutoGen stuff
  91. cp bincheck.mf sntp/
  92. ${AUTORECONF} -i -v
  93. # HMS: 20060618: Now that we use separate copies of libopts
  94. # we should only need the previous line.
  95. #
  96. ## HMS: 20060615: the next line seems to be needed to make sure
  97. ## we get the correct srcdir path in sntp/libopts/Makefile.in
  98. #rm -rf sntp/autom4te.cache
  99. #
  100. #(cd sntp && ${AUTORECONF} -i -v)