Annotation of gforth/vmgen.in, revision 1.8
1.1 anton 1: #! /bin/sh
2: # @configure_input@
1.8 ! anton 3: #Copyright (C) 2001,2002,2003,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.7 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.7 anton 18: #along with this program; if not, see http://www.gnu.org/licenses/.
1.1 anton 19:
20: prefix=@prefix@
21: test "x$GFORTHDIR" != x || GFORTHDIR=@exec_prefix@/bin
1.4 anton 22: test "x$GFORTHDATADIR" != x || GFORTHDATADIR=$prefix/share/gforth/@PACKAGE_VERSION@
1.1 anton 23: 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
1.4 anton 28: echo "vmgen (@PACKAGE_NAME@) @PACKAGE_VERSION@"
1.1 anton 29: $GFORTH --version
1.8 ! anton 30: echo 'Copyright (C) 2001,2002,2003,2007 Free Software Foundation, Inc.'
1.1 anton 31: 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: file=`basename $1 .vmg`
1.3 anton 38: $GFORTH -m 1000000 -e "create vmgen" $GFORTHDATADIR/prims2x.fs -e "c-flag on s\" $file-vm.i\" out-filename 2! s\" $1\" ' output-c ' output-c-combined process-file bye" > $file-vm.i &&
1.2 anton 39: $GFORTH -m 1000000 -e "create vmgen" $GFORTHDATADIR/prims2x.fs -e "c-flag on s\" $1\" ' output-disasm dup process-file bye" > $file-disasm.i &&
40: $GFORTH -m 1000000 -e "create vmgen" $GFORTHDATADIR/prims2x.fs -e "c-flag on s\" $1\" ' output-gen ' noop process-file bye" > $file-gen.i &&
41: $GFORTH -m 1000000 -e "create vmgen" $GFORTHDATADIR/prims2x.fs -e "c-flag on s\" $1\" ' output-label dup process-file bye" > $file-labels.i &&
42: $GFORTH -m 1000000 -e "create vmgen" $GFORTHDATADIR/prims2x.fs -e "c-flag on s\" $1\" ' output-profile dup process-file bye" > $file-profile.i &&
43: $GFORTH -m 1000000 -e "create vmgen" $GFORTHDATADIR/prims2x.fs -e "c-flag on s\" $1\" ' noop ' output-peephole process-file bye" > $file-peephole.i
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>