[gforth] / gforth / vmgen.in  

gforth: gforth/vmgen.in


1 : anton 1.1 #! /bin/sh
2 :     # @configure_input@
3 : anton 1.8 #Copyright (C) 2001,2002,2003,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.7 #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.7 #along with this program; if not, see http://www.gnu.org/licenses/.
19 : anton 1.1
20 :     prefix=@prefix@
21 :     test "x$GFORTHDIR" != x || GFORTHDIR=@exec_prefix@/bin
22 : anton 1.4 test "x$GFORTHDATADIR" != x || GFORTHDATADIR=$prefix/share/gforth/@PACKAGE_VERSION@
23 : anton 1.1 GFORTH=$GFORTHDIR/gforth-fast
24 :     if test $# = 0 || test $1 = --help || test $1 = -h; then
25 :     echo "usage: `basename $0` <file>.vmg"
26 :     exit 0
27 :     elif test $1 = --version || test $1 = -v; then
28 : anton 1.4 echo "vmgen (@PACKAGE_NAME@) @PACKAGE_VERSION@"
29 : anton 1.1 $GFORTH --version
30 : anton 1.8 echo 'Copyright (C) 2001,2002,2003,2007 Free Software Foundation, Inc.'
31 : anton 1.1 echo 'This program is part of Gforth'
32 :     $GFORTH -e "license bye"
33 :     exit 0
34 :     else
35 :     true #old shells require this
36 :     fi
37 : anton 1.9 if grep -q vmgen-version $1; then
38 :     version=`grep vmgen-version $1|sed 's/^.*vmgen-version //'`
39 :     else
40 :     version=0.6.2
41 :     fi
42 :     prims2x=$GFORTHDATADIR/prims2x$version.fs
43 : anton 1.1 file=`basename $1 .vmg`
44 : anton 1.9 $GFORTH -m 1000000 -e "create vmgen" $prims2x -e "c-flag on s\" $file-vm.i\" out-filename 2! s\" $1\" ' output-c ' output-c-combined process-file bye" > $file-vm.i &&
45 :     $GFORTH -m 1000000 -e "create vmgen" $prims2x -e "c-flag on s\" $1\" ' output-disasm dup process-file bye" > $file-disasm.i &&
46 :     $GFORTH -m 1000000 -e "create vmgen" $prims2x -e "c-flag on s\" $1\" ' output-gen ' noop process-file bye" > $file-gen.i &&
47 :     $GFORTH -m 1000000 -e "create vmgen" $prims2x -e "c-flag on s\" $1\" ' output-label dup process-file bye" > $file-labels.i &&
48 :     $GFORTH -m 1000000 -e "create vmgen" $prims2x -e "c-flag on s\" $1\" ' output-profile dup process-file bye" > $file-profile.i &&
49 :     $GFORTH -m 1000000 -e "create vmgen" $prims2x -e "c-flag on s\" $1\" ' noop ' output-peephole process-file bye" > $file-peephole.i

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help