File: configure.cmd

package info (click to toggle)
gforth 0.7.3+dfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,992 kB
  • sloc: ansic: 8,535; sh: 3,666; lisp: 1,778; makefile: 1,019; yacc: 186; sed: 141; lex: 102; awk: 21
file content (77 lines) | stat: -rw-r--r-- 2,963 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
Copyright (C) 1996,1997,1998,2000,2003,2007 Free Software Foundation, Inc.

This file is part of Gforth.

Gforth is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, see http://www.gnu.org/licenses/.
*/
say "*** Configuring for OS/2 with EMX 3.0 GNU C ***"

parse arg args

THREAD="i"
FREGS="n"

do while args \== ""
   parse var args arg args

   select
      when arg="--enable-direct-threaded" then THREAD="d"
      when arg="--enable-indirect-threaded" then THREAD="i"
      when arg="--enable-force-reg" then FREGS="y"
      when arg="--help" then do
        say "--enable and --with options recognized:"
        say "  --enable-force-reg      Use explicit register declarations if they appear in"
        say "                          the machine.h file. This can cause a good speedup,"
        say "                          but also incorrect code with some gcc versions on"
        say "                          some processors (default disabled)."
        say "  --enable-direct-threaded      Force direct threading. This may not work on"
        say "                                some machines and may cause slowdown on others."
        say "                                (default processor-dependent)"
        say "  --enable-indirect-threaded    Force indirect threading. This can cause a"
        say "                                slowdown on some machines."
        say "                                (default processor-dependent)"
      end
    otherwise
      do
        say "*** Unknown option:" arg
        call Usage
      end
  end

end

copy makefile.os2 makefile
copy "engine\makefile.os2" "engine\makefile"
copy kernl32l.fi kernel.fi
copy envos.os2 envos.fs
copy os2conf.h "engine\config.h"
if THREAD="i" THEN DO
	call lineout "engine\config.h", "#ifndef INDIRECT_THREADED"
	call lineout "engine\config.h", "#define INDIRECT_THREADED 1"
	call lineout "engine\config.h", "#endif"
end
IF THREAD="d" THEN do
	call lineout "engine\config.h", "#ifndef DIRECT_THREADED"
	call lineout "engine\config.h", "#define DIRECT_THREADED 1" 
	call lineout "engine\config.h", "#endif"
end
IF FREGS="y" THEN do
	call lineout "engine\config.h", "#ifndef FORCE_REG"
	call lineout "engine\config.h", "#define FORCE_REG 1"
	call lineout "engine\config.h", "#endif"
end
call lineout version.h1, 'static char gforth_version[]="0.4.0";'
call lineout "kernel\version.fs", ': version-string s" 0.4.0" ;'
call lineout 'version-stamp', '0.4.0'