@echo off

REM Version 1.2                                                1997/1/10
REM
REM cygexecl.bat : This file is part of the alliance 3.0 patch for OS/2 & WIN32
REM
REM Copyright (C) 1996 Christoph Jaeschke, jaeschke@item.uni-bremen.de
REM
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; either version 2 of the License, or
REM (at your option) any later version.
REM 
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
REM GNU General Public License for more details.
REM 
REM You should have received a copy of the GNU General Public License
REM along with this program; if not, write to the Free Software
REM Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

REM %2: exename, %3: GenericGNg or bash

IF "%3" == "GenericGNg" goto G
IF "%3" == "bash" goto B
IF "%3" == "tcsh" goto T
echo error at %2, 2nd arg: %3
REM EXIT 1
goto end
:G
ECHO ********%2: %3 ********'
echo #define EXECSHELL "GenericGNg.exe">define.tmp
goto ok
:B
ECHO ********%2: %3 ********'
echo #define EXECSHELL "bash.exe">define.tmp
echo #define EXPANDPATH "/BASH">>define.tmp
goto ok
:T
ECHO ********%2: %3 ********'
echo #define EXECSHELL "tcsh.exe">define.tmp
echo #define EXPANDPATH "/TCSH">>define.tmp
:ok
echo #define EXECNAME "%2">>define.tmp
REM echo #define DEBUG>>define.tmp
cat define.tmp CFileBdyWin32.c > CFile.c
gcc -pipe -g CFile.c -o %1\%2.EXE
rm %1\%2
rm define.tmp
rm CFile.c
:end
