]>
git.saurik.com Git - bison.git/blob - bootstrap
   3 # Bootstrap this package from CVS. 
   5 # Copyright (C) 2003, 2004 Free Software Foundation, Inc. 
   7 # This program is free software; you can redistribute it and/or modify 
   8 # it under the terms of the GNU General Public License as published by 
   9 # the Free Software Foundation; either version 2, or (at your option) 
  12 # This program is distributed in the hope that it will be useful, 
  13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15 # GNU General Public License for more details. 
  17 # You should have received a copy of the GNU General Public License 
  18 # along with this program; if not, write to the Free Software 
  19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
  22 # Written by Paul Eggert. 
  32     echo "$0: usage: $0 [--gnulib-srcdir=DIR] [--cvs-user=USERNAME] [--skip-po]" 
  35     GNULIB_SRCDIR
=`expr "$1" : '--gnulib-srcdir=\(.*\)'`;; 
  37     CVS_USER
=`expr "$1" : '--cvs-user=\(.*\)'`;; 
  41     echo >&2 "$0: $option: unknown option" 
  46 echo "$0: Bootstrapping CVS $package..." 
  50   if [ "${2}" != - ]; then 
  51     CVS_PREFIX
=${CVS_PREFIX}${2}@
 
  57 case ${GNULIB_SRCDIR--} in 
  59   if [ ! -d gnulib 
]; then 
  60     echo "$0: getting gnulib files..." 
  63     trap 'rm -fr gnulib; exit 1' 0 
  65     case ${CVS_AUTH-anoncvs} in 
  67       CVS_PREFIX
='anoncvs@';; 
  69       CVS_PREFIX
="$CVS_USER${CVS_USER+@}";; 
  71       echo "$0: $CVS_AUTH: Unknown CVS access method" >&2 
  76     '') export CVS_RSH
=ssh;; 
  79     cvs 
-z3 -q -d ${CVS_PREFIX}subversions.gnu.org
:/cvsroot
/gnulib co gnulib 
|| exit 
  86 <$GNULIB_SRCDIR/gnulib
-tool || exit 
 107 previous_gnulib_modules
= 
 108 while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do 
 109   previous_gnulib_modules
=$gnulib_modules 
 111     (echo "$gnulib_modules" 
 112      for gnulib_module in $gnulib_modules; do 
 113        $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module 
 119   (for gnulib_module in $gnulib_modules; do 
 120      $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module 
 124 gnulib_dirs
=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u` 
 125 mkdir -p $gnulib_dirs || exit 
 127 for gnulib_file 
in $gnulib_files; do 
 131   m
4/onceonly_2_57.
m4) dest
=m
4/onceonly.
m4;; 
 135   echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" && 
 136   cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit 
 144   echo "$0: getting translations into po..." 
 146    rm -f dummy 
`ls | sed -n '/\.gmo$/p; /\.po/p'` && 
 147    wget 
-nv -nd -r -l 1 -A .po 
-C off \
 
 148      http
://www2.iro.umontreal.ca
/~gnutra
/po
/maint
/$package/ && 
 149    ls *.po 
| sed 's/\.po$//' >LINGUAS
 
 154 # Generate autoconf and automake snippets. 
 156 (echo '# This file is generated automatically by "bootstrap".' && 
 157  echo 'AC_DEFUN([GNULIB_AUTOCONF_SNIPPET],[' && 
 158  $GNULIB_SRCDIR/gnulib
-tool --extract-autoconf-snippet $gnulib_modules && 
 160 ) >m
4/gnulib.
m4 || exit 
 162 (echo '# This file is generated automatically by "bootstrap".' && 
 163  $GNULIB_SRCDIR/gnulib
-tool --extract-automake-snippet $gnulib_modules 
 164 ) >lib
/gnulib.mk 
|| exit 
 167 # Reconfigure, getting other files. 
 169 echo "$0: autoreconf --verbose --install --force ..." 
 170 autoreconf 
--verbose --install --force || exit 
 172 # We don't need intl, so remove it. 
 173 echo "$0: rm -fr intl ..." 
 177 # Patch what appears to be a bug in gettext 0.14.1; 
 178 # remove this once the bug is fixed. 
 179 grep @top_builddir@ po
/Makefile.
in.
in >/dev
/null 
|| { 
 180   echo "$0: prepending 'top_builddir=@top_builddir@' to po/Makefile.in.in ... " 
 181   old_contents
=$(cat po/Makefile.in.in) || exit 
 182   cat >po
/Makefile.
in.
in <<EOF 
 183 top_builddir=@top_builddir@ 
 188 # Put bug-reporting address into po/Makevars. 
 189 echo "$0: sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-bison@gnu.org/' po/Makevars.template >po/Makevars ..." 
 190 sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-bison@gnu.org/' po
/Makevars.template 
>po
/Makevars
 
 193 # if src/parse-gram.[ch] are out of date, rebuild them. 
 194 parse_gram_y
=$
(find src
/parse
-gram.y \
 
 195                  '(' -newer src
/parse
-gram.c 
-o -newer src
/parse
-gram.h 
')' \
 
 197 case $parse_gram_y in 
 199   echo "$0: warning: bootstrapping with old src/parse-gram.[ch] files." 
 201   echo "$0: touch -c src/parse-gram.[ch] ... " 
 202   touch -c src
/parse
-gram.
[ch
] || exit 
 204   echo "$0: ./configure --disable-nls ..." 
 205   .
/configure 
--disable-nls || exit 
 207   echo "$0: (cd lib && make) ..." 
 208   (cd lib 
&& make) || exit 
 210   echo "$0: (cd src && make) ..." 
 211   (cd src 
&& make) || exit 
 213   echo "$0: rm -f src/parse-gram.c src/parse-gram.h ..." 
 214   rm -f src
/parse
-gram.c src
/parse
-gram.h 
|| exit 
 216   echo "$0: (cd src && make parse-gram.c parse-gram.h) ..." 
 217   (cd src 
&& make parse
-gram.c parse
-gram.h
) || exit 
 219   echo "$0: make distclean ..." 
 220   make distclean 
|| exit;; 
 223 echo "$0: done.  Now you can run './configure'."