home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / bin / somcorba.bat < prev    next >
Encoding:
DOS Batch File  |  1996-02-16  |  2.6 KB  |  87 lines

  1. @echo off
  2.  
  3. rem
  4. rem 10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994,1995
  5. rem 
  6. rem All Rights Reserved
  7. rem Licensed Materials - Property of IBM
  8. rem US Government Users Restricted Rights - Use, duplication or
  9. rem disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  10. @REM %Z% %I% %W% %G% %U% [%H% %T%] 
  11.  
  12. rem Command script to convert to implict stars (like CORBA) for 
  13. rem interface references.
  14. rem 
  15. rem SETLOCAL
  16. IF "%SOMBASE%"=="" GOTO sombase
  17. IF "%SC%"=="" GOTO somsc
  18.  
  19. REM IF "%SOMDRIVE%"=="" GOTO body
  20. REM %SOMDRIVE%
  21.  
  22. :body
  23.  
  24. REM IF SMBINDINGS is already set, use it as the destination directory.
  25. if  "%SMBINDINGS%"=="" goto else1
  26.     set SOMDEST=%SMBINDINGS%
  27.     goto endif1
  28. :else1
  29. set SOMDEST=%SOMBASE%\include
  30. :endif1
  31.  
  32. REM On Windows 95, we can't use exist to test a directory
  33. REM That's why we need this work-around.
  34. echo Looking for destination directory %SOMDEST%
  35. md %SOMDEST%
  36. echo test > %SOMDEST%\somtmp.tmp
  37. if not exist %SOMDEST%\somtmp.tmp goto nodest
  38. del %SOMDEST%\somtmp.tmp
  39.  
  40.  
  41. IF NOT EXIST %SOMBASE%\include\som.hc GOTO drive
  42. IF NOT EXIST %SOMBASE%\include\somcorba.gen goto normal
  43.  
  44. echo.
  45. echo You chose to have the C bindings generated in the SOMobjects
  46. echo package you last installed.  This process will take 
  47. echo between 5-30 minutes to complete depending on your system
  48. echo and install options.  Please be patient.
  49. rem  - this process will not
  50. rem echo be run again unless you install some new SOM components.
  51. rem echo.
  52.  
  53. :normal
  54. echo Generating the CORBA C Bindings:
  55. IF EXIST %SOMDEST%\somstars.bld DEL %SOMDEST%\somstars.bld
  56. rem CD %SOMBASE%\include
  57. if exist %SOMDEST%\som.h ATTRIB -R %SOMDEST%\som.h
  58. if exist %SOMDEST%\gen_c.efw ATTRIB -R %SOMDEST%\gen_c.efw
  59. COPY %SOMBASE%\include\som.hc       %SOMDEST%\som.h > NUL
  60. COPY %SOMBASE%\include\gen_c.efc    %SOMDEST%\gen_c.efw  > NUL
  61. SET SMADDSTAR=
  62. %SC% -%% -mnoaddstar -D_WIN32 -sh -d %SOMDEST% %SOMBASE%\include\*.idl
  63. IF NOT ERRORLEVEL 0 GOTO end
  64. IF EXIST %SOMBASE%\include\somdtype.idl %SC% -mnoaddstar -D_WIN32 -sh -DEMIT_SOMDTYPES -d %SOMDEST% %SOMBASE%\include\somdtype.idl
  65. IF EXIST %SOMDEST%\somcorba.gen DEL %SOMDEST%\somcorba.gen
  66. echo somcorba.bld  > %SOMDEST%\somcorba.bld
  67. GOTO end
  68.  
  69. :sombase
  70.     ECHO SOMBASE should be set before running somcorba.
  71.     GOTO end
  72.  
  73. :somsc
  74.     ECHO SC should be set before running somcorba.
  75.     GOTO end
  76.  
  77. :drive
  78. rem    ECHO SOM is not installed on the current drive, please set SOMDRIVE.
  79.     echo Can't find *.idl files. Please check SOMBASE.
  80.     goto end
  81.  
  82. :nodest
  83.     echo Can't create/find destination directory %SOMDEST%
  84.  
  85. :end
  86.     rem ENDLOCAL
  87.