home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / bin / newemit.bat < prev    next >
Encoding:
DOS Batch File  |  1996-01-24  |  2.5 KB  |  99 lines

  1. @ECHO OFF
  2. rem *******************************************************************
  3. rem *** %Z% %I% %W% %G% %U% [%H% %T%]
  4. rem *** 10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  5. rem *** All Rights Reserved
  6. rem *** Licensed Materials - Property of IBM
  7. rem *** US Government Users Restricted Rights - Use, duplication or
  8. rem *** disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. rem *** SOM Toolkit 2.0 - Create a new Emitter.
  10. rem *** class=%1 stem=%2
  11. rem *******************************************************************
  12.  
  13. if "%2" == "" goto error
  14. echo ------------------    Generating  files     --------------------- 
  15. echo Is SMINCLUDE set?
  16. goto process
  17.  
  18. rem if EXIST makefile goto backup
  19.  
  20. :process
  21. if "%1" == "-C++" goto CPPflags
  22. if "%1" == "-c++" goto CPPflags
  23. if "%1" == "-C" goto Cflags
  24. if "%1" == "-c" goto Cflags
  25. set cls=%1
  26. set stem=%2
  27. goto Cprocess
  28.  
  29. :Cflags
  30. set cls=%2
  31. set stem=%3
  32. goto Cprocess
  33.  
  34. :CPPflags
  35. set cls=%2
  36. set stem=%3
  37. goto CPPprocess
  38.  
  39. :Cprocess
  40.  
  41. echo interface %cls% {}; > %stem%.idl
  42.  
  43. echo %stem%.idl:
  44. sc -aemitfile=_%stem%.idl -adeffile=%SOMBASE%\include\gen_idl.efw -sgen %stem%.idl
  45. copy _%stem%.idl %stem%.idl > NUL
  46. del _%stem%.idl
  47.  
  48. echo %stem%.c:
  49. sc -aemitfile=%stem%.c -adeffile=%SOMBASE%\include\gen_c.efw -sgen %stem%.idl
  50.  
  51. echo emit%stem%.c:
  52. sc -aemitfile=emit%stem%.c -adeffile=%SOMBASE%\include\gen_emit.efw -sgen %stem%.idl
  53.  
  54. echo Makfile:
  55. SC -aemitfile=makfile -adeffile=%SOMBASE%\include\gen_mw32.efw -sgen %stem%.idl
  56.  
  57. echo %stem%.efw:
  58. copy %SOMBASE%\include\gen_temp.efw %stem%.efw > NUL
  59.  
  60. echo emit%stem%.def:
  61. sc -aemitfile=emit%stem%.def -adeffile=gen_def.efw -sgen %stem%.idl
  62. goto end
  63.  
  64. :CPPprocess
  65. echo interface %cls% {}; > %stem%.idl
  66.  
  67. echo %stem%.idl:
  68. SC -aemitfile=_%stem%.idl -adeffile=%SOMBASE%\include\gen_idl.efw -sgen %stem%.idl
  69. copy _%stem%.idl %stem%.idl > NUL
  70. del _%stem%.idl
  71.  
  72. echo %stem%.cpp:
  73. SC -aemitfile=%stem%.cpp -adeffile=%SOMBASE%\include\gen_cpp.efw -sgen %stem%.idl
  74.  
  75. echo emit%stem%.cpp:
  76. SC -aemitfile=emit%stem%.cpp -adeffile=%SOMBASE%\include\gen_emit.efx -sgen %stem%.idl
  77.  
  78. echo Makfile:
  79. SC -aemitfile=makfile -adeffile=%SOMBASE%\include\gen_mx32.efw -sgen %stem%.idl
  80.  
  81. echo %stem%.efw:
  82. copy %SOMBASE%\include\gen_temp.efw %stem%.efw > NUL
  83.  
  84. echo emit%stem%.def:
  85. sc -aemitfile=emit%stem%.def -adeffile=gen_def.efw -sgen %stem%.idl
  86.  
  87. goto end
  88.  
  89. :backup
  90. copy makefile makefile.bak > NUL
  91. del makefile
  92. goto process
  93.  
  94. :error
  95. echo "usage: newemit [-C | -C++] <className> <stem>"
  96. goto end
  97.  
  98. :end
  99.