Annotation of gforth/BUILD-FROM-SCRATCH, revision 1.20

1.1       jwilke      1: # Procedures to build gforth from the CVS sources
1.3       anton       2: 
1.11      anton       3: #use this with parameters and env variables like "configure"
                      4: 
1.16      anton       5: #Copyright (C) 2000,2002,2003,2006 Free Software Foundation, Inc.
1.3       anton       6: 
                      7: #This file is part of Gforth.
                      8: 
                      9: #Gforth is free software; you can redistribute it and/or
                     10: #modify it under the terms of the GNU General Public License
                     11: #as published by the Free Software Foundation; either version 2
                     12: #of the License, or (at your option) any later version.
                     13: 
                     14: #This program is distributed in the hope that it will be useful,
                     15: #but WITHOUT ANY WARRANTY; without even the implied warranty of
                     16: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
                     17: #GNU General Public License for more details.
                     18: 
                     19: #You should have received a copy of the GNU General Public License
                     20: #along with this program; if not, write to the Free Software
1.4       anton      21: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
1.3       anton      22: 
                     23: 
1.1       jwilke     24: # created: 2may00jaw
                     25: 
1.6       jwilke     26: # To build gforth from scratch you need autoconf, automake and a 
1.17      anton      27: # gforth-0.6.2
1.1       jwilke     28: # This file can be used as shell script. If you make the environment
1.2       pazsan     29: # variable GFORTH point to an existing gforth installation, this
1.6       jwilke     30: # script takes over the whole build process and will produce the
                     31: # kernel kernel images from the sources as well
1.1       jwilke     32: 
1.6       jwilke     33: # try to guess a installed gforth
1.2       pazsan     34: 
1.8       jwilke     35: if [ "$GFORTH"xx = "xx" ];
1.2       pazsan     36: then
1.10      anton      37:        rm -f gforth
1.2       pazsan     38:        GFORTH=`which gforth`
1.9       anton      39:        if [ "$GFORTH"xx = "xx" ]; then
                     40:                echo 'BUILD-FROM-SCRATCH needs a working gforth (in environment variable GFORTH)'
                     41:                 exit 1
                     42:         fi
1.10      anton      43:        GFORTH="$GFORTH -m4M"
1.2       pazsan     44: fi
                     45: 
1.1       jwilke     46: # makes a aclocal.m4 which includes the automake macros for autconf
                     47: 
1.19      anton      48: aclocal &&
1.1       jwilke     49: 
                     50: # generate configure script
                     51: 
1.19      anton      52: autoconf &&
1.1       jwilke     53: 
                     54: # generate header files like engine/config.h.in
                     55: 
1.19      anton      56: autoheader &&
1.14      pazsan     57: echo timestamp >stamp-h.in
1.1       jwilke     58: 
1.15      pazsan     59: # run configure Script
1.1       jwilke     60: 
1.19      anton      61: ./configure "$@" &&
1.1       jwilke     62: 
1.17      anton      63: # if you have specified a previous Gforth, you can safely run make now
                     64: # with FORTHK and FORTHP changed appropriately.
1.1       jwilke     65: 
1.10      anton      66: #a local gforth.fi probably does not work with $GFORTH
1.19      anton      67: rm -f gforth.fi &&
1.10      anton      68: 
1.8       jwilke     69: if [ "$GFORTH"xx != "xx" ]
1.2       pazsan     70: then
1.20    ! anton      71:  bootstrap=engine/prim.i" "`for x in b l; do for wid in 16 32 64; do echo kernl$wid$x.fi; done; done`
1.19      anton      72:  echo 'Running: make BUILDFORTH="'$GFORTH'" FORTHP="'$GFORTH'" '$bootstrap &&
                     73:  make BUILDFORTH="$GFORTH" FORTHP="$GFORTH" engine/prim.i $bootstrap &&
                     74:  echo Running: make &&
                     75:  make &&
                     76:  make doc &&
                     77:  make more
1.1       jwilke     78: fi

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