home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cment.zip / CXX2EXE.CMD < prev    next >
OS/2 REXX Batch file  |  1994-05-19  |  1KB  |  33 lines

  1. /******************************************************************************\
  2. *                                                                              *
  3. *                          Compile .CXX file to .EXE                           *
  4. *              Copyright (C) 1994, The Masterpiece Software Company            *
  5. *                                                                              *
  6. \******************************************************************************/
  7.  
  8.  
  9. cxx = Value(CXX,,OS2ENVIRONMENT);
  10. axx = Arg(1);
  11.  
  12. If   cxx = ''
  13. Then cxx = 'ICC.EXE';
  14.  
  15. Do   ii = 1 to Words(cxx);              /* Append prelisted .OBJ and .LIB */
  16.      aa = Translate(Word(cxx,ii));
  17.      If   Pos('.OBJ',aa) > 0,
  18.       |   Pos('.LIB',aa) > 0
  19.      Then Do;
  20.           axx = axx || ' ' || Word(cxx,ii);
  21.           cxx = DelWord(cxx,ii,1);
  22.           End;
  23. End;
  24.  
  25. Say  ;
  26. Say  '====>' Date('O') Time() cxx axx '. . .';
  27.  
  28. '@'||cxx axx '2>&1';
  29.  
  30. '@DEL' Left(Arg(1),Pos('.',Arg(1))) || 'OBJ > NUL 2> NUL';
  31.  
  32. Exit 0;
  33.