version 1.1, 1996/10/06 22:24:15
|
version 1.2, 1996/11/04 22:58:44
|
Line 1
|
Line 1
|
@echo off |
/*
|
/* Copyright 1995 Free Software Foundation, Inc. |
Copyright 1995 Free Software Foundation, Inc.
|
|
|
This file is part of Gforth. |
This file is part of Gforth.
|
|
|
Gforth is free software; you can redistribute it and/or |
Gforth is free software; you can redistribute it and/or
|
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License
|
as published by the Free Software Foundation; either version 2 |
as published by the Free Software Foundation; either version 2
|
of the License, or (at your option) any later version. |
of the License, or (at your option) any later version.
|
|
|
This program is distributed in the hope that it will be useful, |
This program is distributed in the hope that it will be useful,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
GNU General Public License for more details. |
GNU General Public License for more details.
|
|
|
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License
|
along with this program; if not, write to the Free Software |
along with this program; if not, write to the Free Software
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
*/ |
*/
|
echo *** Configuring for OS/2 with EMX 3.0 GNU C *** |
say "*** Configuring for OS/2 with EMX 3.0 GNU C ***"
|
THREAD = i |
|
FREGS = n |
parse arg args
|
:switches |
|
IF "%1"=="--enable-direct-threaded" then THREAD=d |
THREAD="i"
|
IF "%1"=="--enable-indirect-threaded" then THREAD=i |
FREGS="n"
|
IF "%1"=="--enable-force-reg" then FREGS=y |
|
shift |
do while args \== ""
|
if "%1"!="" goto switches |
parse var args arg args
|
copy makefile.os2 makefile |
|
copy kernl32l.fi kernel.fi |
select
|
copy 386.h machine.h |
when arg="--enable-direct-threaded" then THREAD="d"
|
copy os2conf.h config.h |
when arg="--enable-indirect-threaded" then THREAD="i"
|
copy startup.fs startup.unx |
when arg="--enable-force-reg" then FREGS="y"
|
copy startup.dos startup.fs |
when arg="--help" then do
|
copy history.dos history.fs |
say "--enable and --with options recognized:"
|
if THREAD == 'i' then do |
say " --enable-force-reg Use explicit register declarations if they appear in"
|
ECHO #ifndef INDIRECT_THREADED >>config.h |
say " the machine.h file. This can cause a good speedup,"
|
ECHO #define INDIRECT_THREADED 1 >>config.h |
say " but also incorrect code with some gcc versions on"
|
ECHO #endif >>config.h |
say " some processors (default disabled)."
|
end |
say " --enable-direct-threaded Force direct threading. This may not work on"
|
if THREAD == 'd' then do |
say " some machines and may cause slowdown on others."
|
ECHO #ifndef DIRECT_THREADED >>config.h |
say " (default processor-dependent)"
|
ECHO #define DIRECT_THREADED 1 >>config.h |
say " --enable-indirect-threaded Force indirect threading. This can cause a"
|
ECHO #endif >>config.h |
say " slowdown on some machines."
|
end |
say " (default processor-dependent)"
|
if FREGS == 'y' then do |
end
|
ECHO #ifndef FORCE_REG >>config.h |
otherwise
|
ECHO #define FORCE_REG 1 >>config.h |
do
|
ECHO #endif >>config.h |
say "*** Unknown option:" arg
|
end |
call Usage
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
copy makefile.os2 makefile
|
|
copy kernl32l.fi kernel.fi
|
|
copy 386.h machine.h
|
|
copy os2conf.h config.h
|
|
copy startup.fs startup.unx
|
|
copy startup.dos startup.fs
|
|
copy history.dos history.fs
|
|
if THREAD="i" THEN DO
|
|
call lineout config.h, "#ifndef INDIRECT_THREADED"
|
|
call lineout config.h, "#define INDIRECT_THREADED 1"
|
|
call lineout config.h, "#endif"
|
|
end
|
|
IF THREAD="d" THEN do
|
|
call lineout config.h, "#ifndef DIRECT_THREADED"
|
|
call lineout config.h, "#define DIRECT_THREADED 1"
|
|
call lineout config.h, "#endif"
|
|
end
|
|
IF FREGS="y" THEN do
|
|
call lineout config.h, "#ifndef FORCE_REG"
|
|
call lineout config.h, "#define FORCE_REG 1"
|
|
call lineout config.h, "#endif"
|
|
end
|
|
|
|
|