[gforth] / gforth / gforthmi.in  

gforth: gforth/gforthmi.in


1 : pazsan 1.16 #! @SH@
2 : anton 1.1 # @configure_input@
3 : anton 1.15 #Copyright (C) 1997,1998,2000,2002,2003,2004,2007 Free Software Foundation, Inc.
4 : anton 1.1
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 : anton 1.14 #as published by the Free Software Foundation, either version 3
10 : anton 1.1 #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 : anton 1.14 #along with this program; if not, see http://www.gnu.org/licenses/.
19 : anton 1.1
20 : pazsan 1.16 startup="-i @kernel_fi@ exboot.fs startup.fs @asm_fs@ @disasm_fs@"
21 : anton 1.1 prefix=@prefix@
22 :     exec_prefix=@exec_prefix@
23 : pazsan 1.16 if [ -f "@libdir@/gforth/@PACKAGE_VERSION@/gforth.fi" ]
24 :     then
25 :     helper=""
26 :     else
27 :     helper="$startup"
28 :     fi
29 : pazsan 1.19 test "x$GFORTHD" != x || GFORTHD="@bindir@/gforth-ditc-@PACKAGE_VERSION@@ARCH@ --die-on-signal"
30 :     test "x$GFORTH" != x || GFORTH="@bindir@/gforth-@PACKAGE_VERSION@@ARCH@ --die-on-signal $helper"
31 : anton 1.1 if test $# = 0 || test $1 = --help || test $1 = -h; then
32 : anton 1.4 echo "usage: `basename $0` [--application] target-name [gforth-options]"
33 : anton 1.1 echo "creates a relocatable image 'target-name'"
34 :     echo "environment:"
35 :     echo " \$GFORTHD (default: $GFORTHD): Engine used for creating the fixed images"
36 :     echo " \$GFORTH (default: $GFORTH): Engine used for computing the relocatable image"
37 :     test $# != 0 || exit 1
38 :     exit 0
39 :     elif test $1 = --version || test $1 = -v; then
40 : anton 1.9 echo "gforthmi (@PACKAGE_NAME@) @PACKAGE_VERSION@"
41 : anton 1.1 $GFORTH --version
42 : anton 1.15 echo 'Copyright (C) 1998,2002,2003,2004,2007 Free Software Foundation, Inc.'
43 : anton 1.1 echo 'This program is part of Gforth'
44 :     $GFORTH -e "license bye"
45 :     exit 0
46 : anton 1.4 elif test $1 = --application; then
47 :     application=yes
48 :     shift
49 : pazsan 1.17 outfile=$1; shift
50 : pazsan 1.16 generate="$@"
51 :     elif test $1 = --system; then
52 :     shift
53 :     generate=$startup
54 :     outfile="@libdir@/gforth/@PACKAGE_VERSION@/gforth.fi"
55 : pazsan 1.18 export libccdir="@libexecdir@/gforth/@PACKAGE_VERSION@/libcc-named"
56 : anton 1.5 else
57 : pazsan 1.17 outfile=$1; shift
58 : pazsan 1.16 generate="$@"
59 : anton 1.1 fi
60 :     tmpfile=./temp-image.fi
61 : pazsan 1.16 $GFORTHD --clear-dictionary --no-offset-im --die-on-signal $generate -e "savesystem $tmpfile"1" bye"
62 :     $GFORTHD --clear-dictionary --offset-image --die-on-signal $generate -e "savesystem $tmpfile"2" bye"
63 : anton 1.3 $GFORTH comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
64 : anton 1.1 chmod +x $outfile
65 :     #gforth-0.2.1 -m 100000 comp-i.fs -e "comp-image $tmpfile"1" $tmpfile"2" $outfile bye"
66 :     rm $tmpfile"1" $tmpfile"2"
67 : anton 1.4 if test x$application = xyes; then
68 : anton 1.12 $GFORTH -e "s\" $outfile\"" make-app.fs
69 : anton 1.5 else
70 :     true #old shells require this
71 : anton 1.4 fi
72 :    

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help