1: #! /bin/sh
2: #Copyright (C) 1997,1998 Free Software Foundation, Inc.
3:
4: #This file is part of Gforth.
5:
6: #Gforth is free software; you can redistribute it and/or
7: #modify it under the terms of the GNU General Public License
8: #as published by the Free Software Foundation; either version 2
9: #of the License, or (at your option) any later version.
10:
11: #This program is distributed in the hope that it will be useful,
12: #but WITHOUT ANY WARRANTY; without even the implied warranty of
13: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
14: #GNU General Public License for more details.
15:
16: #You should have received a copy of the GNU General Public License
17: #along with this program; if not, write to the Free Software
18: #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19:
20: test "x$GFORTHD" != x || GFORTHD=@pkglibdir@/gforth-ditc
21: test "x$GFORTH" != x || GFORTH=@bindir@/gforth
22: if test $# = 0 || test $1 = --help || test $1 = -h; then
23: echo "usage: `basename $0` target-name [gforth-options]"
24: echo "creates a relocatable image 'target-name'"
25: echo "environment:"
26: echo " \$GFORTHD (default: $GFORTHD): System used for creating the fixed images"
27: echo " \$GFORTH (default: $GFORTH): System used for computing the relocatable image"
28: test $# != 0 || exit 1
29: exit 0
30: elif test $1 = --version || test $1 = -v; then
31: echo "gforthmi (@PACKAGE@) @VERSION@"
32: $GFORTH --version
33: echo FIXME: copyright
34: exit 0
35: fi
36: outfile=$1; shift
37: tmpfile=./temp-image.fi
38: $GFORTHD --clear-dictionary --no-offset-im $* -e "savesystem $tmpfile"1" bye"
39: $GFORTHD --clear-dictionary --offset-image $* -e "savesystem $tmpfile"2" bye"
40: $GFORTH comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
41: chmod +x $outfile
42: #gforth-0.2.1 -m 100000 comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
43: rm $tmpfile"1" $tmpfile"2"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>