@echo off
rem @(#) 1.17 src/somc/comp/somxh.bat, somc.utils, som3.0 12/17/96 18:34:02 [12/22/96 21:25:47]

rem COMPONENT_NAME: some
rem
rem ORIGINS: 27
rem
rem 25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996  
rem All Rights Reserved
rem Licensed Materials - Property of IBM
rem US Government Users Restricted Rights - Use, duplication or
rem disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

rem Command script to convert to implict stars (like CORBA) for
rem interface references.

rem SETLOCAL
IF "%SOMBASE%"=="" GOTO sombase
IF "%SC%"=="" GOTO somsc

IF "%SOMDRIVE%"=="" GOTO body
%SOMDRIVE%

:body

IF NOT EXIST %SOMBASE%\include\somxh.gen goto normal
echo.
echo You chose to have the C++ bindings generated in the SOMobjects
echo package you last installed.  This process will take
echo between 5-30 minutes to complete depending on your system
echo and install options.  Please be patient - this process will not
echo be run again unless you install some new SOM components.
echo.

:normal
echo Generating the SOM C++ Bindings:
CD %SOMBASE%\include
IF NOT EXIST som.hc GOTO drive:
SET SMNOADDSTAR=
%SC% -%% -sxh -mwinmult -mnochk *.idl
IF NOT ERRORLEVEL 0 GOTO end
echo somxh.bld > somxh.bld
IF EXIST somdtype.idl %SC% -mwinmult -mnochk -sxh -DEMIT_SOMDTYPES somdtype.idl
IF EXIST somxh.gen DEL somxh.gen
GOTO end

:sombase
    ECHO SOMBASE should be set before running somxh.
    GOTO end

:somsc
    ECHO SC should be set before running somxh.
    GOTO end

:drive
    ECHO SOM is not installed on the current drive, please set SOMDRIVE.

:end
rem  ENDLOCAL
