Annotation of gforth/gforthmi.in, revision 1.15
1.1 anton 1: #! /bin/sh
2: # @configure_input@
1.15 ! anton 3: #Copyright (C) 1997,1998,2000,2002,2003,2004,2007 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
1.14 anton 9: #as published by the Free Software Foundation, either version 3
1.1 anton 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
1.14 anton 18: #along with this program; if not, see http://www.gnu.org/licenses/.
1.1 anton 19:
20: prefix=@prefix@
21: exec_prefix=@exec_prefix@
1.9 anton 22: test "x$GFORTHD" != x || GFORTHD=$prefix/lib/gforth/@PACKAGE_VERSION@/gforth-ditc
23: test "x$GFORTH" != x || GFORTH="@bindir@/gforth-@PACKAGE_VERSION@ --die-on-signal"
1.1 anton 24: if test $# = 0 || test $1 = --help || test $1 = -h; then
1.4 anton 25: echo "usage: `basename $0` [--application] target-name [gforth-options]"
1.1 anton 26: echo "creates a relocatable image 'target-name'"
27: echo "environment:"
28: echo " \$GFORTHD (default: $GFORTHD): Engine used for creating the fixed images"
29: echo " \$GFORTH (default: $GFORTH): Engine used for computing the relocatable image"
30: test $# != 0 || exit 1
31: exit 0
32: elif test $1 = --version || test $1 = -v; then
1.9 anton 33: echo "gforthmi (@PACKAGE_NAME@) @PACKAGE_VERSION@"
1.1 anton 34: $GFORTH --version
1.15 ! anton 35: echo 'Copyright (C) 1998,2002,2003,2004,2007 Free Software Foundation, Inc.'
1.1 anton 36: echo 'This program is part of Gforth'
37: $GFORTH -e "license bye"
38: exit 0
1.4 anton 39: elif test $1 = --application; then
40: application=yes
41: shift
1.5 anton 42: else
43: true #old shells require this
1.1 anton 44: fi
45: outfile=$1; shift
46: tmpfile=./temp-image.fi
1.8 anton 47: $GFORTHD --clear-dictionary --no-offset-im --die-on-signal "$@" -e "savesystem $tmpfile"1" bye"
48: $GFORTHD --clear-dictionary --offset-image --die-on-signal "$@" -e "savesystem $tmpfile"2" bye"
1.3 anton 49: $GFORTH comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
1.1 anton 50: chmod +x $outfile
51: #gforth-0.2.1 -m 100000 comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
52: rm $tmpfile"1" $tmpfile"2"
1.4 anton 53: if test x$application = xyes; then
1.12 anton 54: $GFORTH -e "s\" $outfile\"" make-app.fs
1.5 anton 55: else
56: true #old shells require this
1.4 anton 57: fi
58:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>