Annotation of gforth/gforthmi.in, revision 1.12

1.1       anton       1: #! /bin/sh
                      2: # @configure_input@
1.11      anton       3: #Copyright (C) 1997,1998,2000,2002,2003 Free Software Foundation, Inc.
1.1       anton       4: 
                      5: #This file is part of Gforth.
                      6: 
                      7: #Gforth is free software; you can redistribute it and/or
                      8: #modify it under the terms of the GNU General Public License
                      9: #as published by the Free Software Foundation; either version 2
                     10: #of the License, or (at your option) any later version.
                     11: 
                     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.
                     16: 
                     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
1.7       anton      19: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
1.1       anton      20: 
                     21: prefix=@prefix@
                     22: exec_prefix=@exec_prefix@
1.9       anton      23: test "x$GFORTHD" != x || GFORTHD=$prefix/lib/gforth/@PACKAGE_VERSION@/gforth-ditc
                     24: test "x$GFORTH" != x || GFORTH="@bindir@/gforth-@PACKAGE_VERSION@ --die-on-signal"
1.1       anton      25: if test $# = 0 || test $1 = --help || test $1 = -h; then
1.4       anton      26:   echo "usage: `basename $0` [--application] target-name [gforth-options]"
1.1       anton      27:   echo "creates a relocatable image 'target-name'"
                     28:   echo "environment:"
                     29:   echo " \$GFORTHD (default: $GFORTHD): Engine used for creating the fixed images"
                     30:   echo " \$GFORTH (default: $GFORTH): Engine used for computing the relocatable image"
                     31:   test $# != 0 || exit 1
                     32:   exit 0
                     33: elif test $1 = --version || test $1 = -v; then
1.9       anton      34:   echo "gforthmi (@PACKAGE_NAME@) @PACKAGE_VERSION@"
1.1       anton      35:   $GFORTH --version
1.11      anton      36:   echo 'Copyright (C) 1998,2002,2003 Free Software Foundation, Inc.'
1.1       anton      37:   echo 'This program is part of Gforth'
                     38:   $GFORTH -e "license bye"
                     39:   exit 0
1.4       anton      40: elif test $1 = --application; then
                     41:     application=yes
                     42:     shift
1.5       anton      43: else
                     44:     true #old shells require this
1.1       anton      45: fi
                     46: outfile=$1; shift
                     47: tmpfile=./temp-image.fi
1.8       anton      48: $GFORTHD --clear-dictionary --no-offset-im --die-on-signal "$@" -e "savesystem $tmpfile"1" bye"
                     49: $GFORTHD --clear-dictionary --offset-image --die-on-signal "$@" -e "savesystem $tmpfile"2" bye"
1.3       anton      50: $GFORTH comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
1.1       anton      51: chmod +x $outfile
                     52: #gforth-0.2.1 -m 100000  comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
                     53: rm $tmpfile"1" $tmpfile"2"
1.4       anton      54: if test x$application = xyes; then
1.12    ! anton      55:     $GFORTH -e "s\" $outfile\"" make-app.fs
1.5       anton      56: else
                     57:     true #old shells require this
1.4       anton      58: fi
                     59: 

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