home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
patches
/
toolkt20
/
gnu.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-08-03
|
4KB
|
115 lines
@ECHO OFF
CLS
REM **************************************************************************
REM GNU.CMD
REM
REM Alters IBM's TOOLKT20\C\OS2H\ directory contents so that they may be used
REM both with GNU C/C++ and IBM C Set/2.
REM
REM Please note that those header files are Copyright IBM Corp.
REM
REM **************************************************************************
REM Instructions
REM
REM Look at this command file before you execute it, just in case there are
REM incompatibilities between this and your setup. Specifically make sure
REM that the directories used in this command file are indeed the directories
REM on your system.
REM
REM Since this is a "hack" job not a commercial program no fancy stuff is
REM done to ensure that the results are even usable.
REM That is YOUR responsibility.
REM
REM THIS COMMAND FILE IS FREE SOFTWARE AND AS SUCH COMES WITH NO WARRANTY
REM NOT EVEN FOR MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
REM
REM **************************************************************************
SETLOCAL
REM Just in case you are not in the mood to look at this file.
REM
ECHO You MUST modify this file before running it!
GOTO :end
REM Set the following variables to:
REM
REM 1) the installation directory (from which you are doing the fix)
REM 2) the directory in which the OS2H subdirectory is found.
REM
REM Note that the install directory and the TOOLKIT directory should
REM be on the same drive.
REM
SET INSTDIR=\TEMP
SET TKDIR=\TK20
REM Preserving the original TOOLKT20\C\OS2H\ directory and some files.
REM
ECHO *************************************************************************
ECHO Making backup of original %TKDIR%\OS2H directory.
ECHO *************************************************************************
MKDIR %TKDIR%\OLDOS2H
IF NOT EXIST %TKDIR%\OLDOS2H GOTO :error
XCOPY %TKDIR%\OS2H\*.* %TKDIR%\OLDOS2H\ /S /E
REM Applying patches to some files.
REM
ECHO.
ECHO *************************************************************************
ECHO Applying patches...
ECHO *************************************************************************
CD %INSTDIR%
UXPATCH %TKDIR%\OS2H\BDCALLS.H BDCALLS.DIF
UXPATCH %TKDIR%\OS2H\BSESUB.H BSESUB.DIF
UXPATCH %TKDIR%\OS2H\OS2DEF.H OS2DEF.DIF
UXPATCH %TKDIR%\OS2H\PMAVIO.H PMAVIO.DIF
REM Setting up for alteration
REM
MKDIR %TKDIR%\OS2H-NC
REM Altering by first removing comments.
REM
ECHO.
ECHO *************************************************************************
ECHO Removing comments...
ECHO *************************************************************************
CD %TKDIR%\OS2H
FOR %%F IN (*.H) DO %INSTDIR%\UNCOMM -i %%F -o %TKDIR%\OS2H-NC\%%F
REM Now applying the final change.
REM
ECHO.
ECHO *************************************************************************
ECHO Applying changes...
ECHO *************************************************************************
CD %TKDIR%\OS2H-NC
FOR %%F IN (*.H) DO %INSTDIR%\GNUFIX -i %%F -o %TKDIR%\OS2H\%%F
REM Remove no longer needed files/directories.
REM
CD %INSTDIR%
ERASE %TKDIR%\OS2H-NC /N
RMDIR %TKDIR%\OS2H-NC
ECHO.
ECHO.
ECHO *************************************************************************
ECHO The original %TKDIR%\OS2H\*.h headers are in %TKDIR%\OLDOS2H
ECHO Some files have been altered. The originals have ".OLD" extension.
ECHO On HPFS File Systems the originals are also in ".orig" files.
ECHO *************************************************************************
ECHO Modifications are complete.
GOTO :end
REM No error checking is done in the .CMD file!
REM
:error
ECHO An error occured during program run.
:end
ENDLOCAL