home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: WPS_PM / WPS_PM.zip / xfld085s.zip / make.cmd < prev    next >
OS/2 REXX Batch file  |  1999-03-15  |  6KB  |  188 lines

  1. /* Make XFolder */
  2. "@echo off"
  3. /* make all XFolder files */
  4.  
  5. /*
  6.     This will call nmake with all the makefiles in the
  7.     subdirectories to update all parts of XFolder:
  8.     the main module, the NLS DLLS, and  all the HLP and INF files.
  9.  
  10.     Note that there are some directory checks below which might
  11.     not apply to your system, because I am also using this script
  12.     to update my "private" XFolder parts which are not included
  13.     in the source distribution.
  14.  
  15.     This script is smart enough though to check for the existence
  16.     of those directories.
  17. */
  18.  
  19. /*
  20.     Change the following if you need some cmd file
  21.     which sets compiler variables; otherwise comment
  22.     this out. This is only because I don't like all
  23.     the VAC++ settings in CONFIG.SYS.
  24. */
  25.  
  26. "call envicc.cmd"
  27.  
  28. /*
  29.     You MUST change the following to the path where
  30.     you installed XFolder; the makefiles will automatically
  31.     copy the resulting files thereto.
  32. */
  33.  
  34. "SET XFOLDERPATH=G:\develop\C\XFolder\running"
  35.  
  36. /*
  37.     If the following variable is set to ANYTHING, the
  38.     makefiles will produce no debug code, but code for
  39.     the release version.
  40. */
  41.  
  42. "SET XFRELEASE=YES"
  43.  
  44. /* *** go! */
  45.  
  46. /* reset timer */
  47. call time("E")
  48. mydir = directory();
  49.  
  50. Say "***********************************************"
  51. Say "*  Making XFolder main module (./MAIN/)...    *"
  52. Say "***********************************************"
  53. "cd main"
  54. "nmake /nologo xfldr.mak"
  55. "cd .."
  56.  
  57. Say "***********************************************"
  58. Say "*  Making NLS files...                        *"
  59. Say "***********************************************"
  60. Say "   Making /001/XFLDR001.DLL"
  61. "cd 001"
  62. "nmake /nologo xfldr001.mak"
  63.  
  64. Say "   Making /001/INF.001/XFLDR001.INF..."
  65. "cd inf.001"
  66. "nmake /nologo inf001.mak"
  67.  
  68. Say "   Making /001/HELP.001/XFLDR001.HLP..."
  69. "cd ..\help.001"
  70. "nmake /nologo help001.mak"
  71. "cd ..\.."
  72.  
  73. /* if you want to create new NLS files, */
  74. /* change the following "049"'s to your */
  75. /* language code */
  76.  
  77. /* this is for German */
  78. LanguageDir  = "049_de"
  79. LanguageCode = "049"
  80.  
  81. if (stream(LanguageDir"\xfldr"LanguageCode".mak", "C", "QUERY EXISTS") \= "") then
  82. do
  83.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".DLL..."
  84.     "cd "LanguageDir
  85.     "copy ..\001\inf.001\vers_2history.html .\inf.049 > NUL"
  86.     "copy ..\001\inf.001\notices_41thanks.html .\inf.049 > NUL"
  87.     "copy ..\001\inf.001\notices_42credits.html .\inf.049 > NUL"
  88.     /* "copy ..\001\inf.001\further*.html .\inf.049 > NUL" */
  89.     "nmake /nologo xfldr"LanguageCode".mak"
  90.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".INF..."
  91.     "cd inf."LanguageCode
  92.     "nmake /nologo inf"LanguageCode".mak"
  93.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".HLP..."
  94.     "cd ..\help."LanguageCode
  95.     "nmake /nologo help"LanguageCode".mak"
  96.     "cd "mydir
  97. end;
  98.  
  99. /* this is for Spanish */
  100.  
  101. LanguageDir  = "034_es"
  102. LanguageCode = "034"
  103.  
  104. if (stream(LanguageDir"\xfldr"LanguageCode".mak", "C", "QUERY EXISTS") \= "") then
  105. do
  106.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".DLL..."
  107.     "cd "LanguageDir
  108. /*     "copy ..\001\inf.001\vers_2history.html .\inf."LanguageCode" > NUL" */
  109. /*     "copy ..\001\inf.001\notices_41thanks.html .\inf."LanguageCode" > NUL" */
  110. /*     "copy ..\001\inf.001\notices_42credits.html .\inf."LanguageCode" > NUL" */
  111. /*     "copy ..\001\inf.001\further*.html .\inf."LanguageCode" > NUL" */
  112.     "nmake /nologo xfldr"LanguageCode".mak"
  113. /*    Say "  Making "LanguageDir"/XFLDR"LanguageCode".INF..."
  114.      "cd inf."LanguageCode
  115.     "nmake /nologo inf"LanguageCode".mak"
  116.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".HLP..."
  117.     "cd ..\help."LanguageCode
  118.     "nmake /nologo help"LanguageCode".mak" */
  119.     "cd "mydir
  120. end;
  121.  
  122. /* this is for Swedish */
  123.  
  124. LanguageDir  = "046_se"
  125. LanguageCode = "046"
  126.  
  127. if (stream(LanguageDir"\xfldr"LanguageCode".mak", "C", "QUERY EXISTS") \= "") then
  128. do
  129.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".DLL..."
  130.     "cd "LanguageDir
  131. /*     "copy ..\001\inf.001\vers_2history.html .\inf."LanguageCode" > NUL" */
  132. /*     "copy ..\001\inf.001\notices_41thanks.html .\inf."LanguageCode" > NUL" */
  133. /*     "copy ..\001\inf.001\notices_42credits.html .\inf."LanguageCode" > NUL" */
  134. /*     "copy ..\001\inf.001\further*.html .\inf."LanguageCode" > NUL" */
  135.     "nmake /nologo xfldr"LanguageCode".mak"
  136.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".INF..."
  137.     "cd inf."LanguageCode
  138.     "nmake /nologo inf"LanguageCode".mak"
  139.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".HLP..."
  140.     "cd ..\help."LanguageCode
  141.     "nmake /nologo help"LanguageCode".mak"
  142.     "cd "mydir
  143. end;
  144.  
  145. /* this is for czech */
  146.  
  147. LanguageDir  = "421_cz"
  148. LanguageCode = "421"
  149.  
  150. if (stream(LanguageDir"\xfldr"LanguageCode".mak", "C", "QUERY EXISTS") \= "") then
  151. do
  152.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".DLL..."
  153.     "cd "LanguageDir
  154. /*     "copy ..\001\inf.001\vers_2history.html .\inf."LanguageCode" > NUL" */
  155. /*     "copy ..\001\inf.001\notices_41thanks.html .\inf."LanguageCode" > NUL" */
  156. /*     "copy ..\001\inf.001\notices_42credits.html .\inf."LanguageCode" > NUL" */
  157. /*     "copy ..\001\inf.001\further*.html .\inf."LanguageCode" > NUL" */
  158.     "nmake /nologo xfldr"LanguageCode".mak"
  159. /*    Say "  Making "LanguageDir"/XFLDR"LanguageCode".INF..."
  160.      "cd inf."LanguageCode
  161.     "nmake /nologo inf"LanguageCode".mak"
  162.     Say "  Making "LanguageDir"/XFLDR"LanguageCode".HLP..."
  163.     "cd ..\help."LanguageCode
  164.     "nmake /nologo help"LanguageCode".mak" */
  165.     "cd "mydir
  166. end;
  167.  
  168. /* XFolder Programming Guide and Reference; this
  169.    only exists on my harddisk ;-) */
  170. if (stream("..\progref\progref.mak", "C", "QUERY EXISTS") \= "") then do
  171.     Say "  Making ..\progref\xfsrc.mak"
  172.     "cd ..\progref"
  173.     "copy ..\source\001\inf.001\notices_1licence.html"
  174.     "nmake /nologo progref.mak"
  175.     "cd "mydir
  176. end
  177.  
  178. /* show elapsed time */
  179. seconds = time("e"); /* in seconds */
  180. minutes = trunc(seconds/60);
  181. seconds2 = trunc(seconds - (minutes*60));
  182. Say;
  183. Say "Done!"
  184. Say "Elapsed time: "minutes" minutes, "seconds2" seconds."
  185. "pause"
  186.  
  187.  
  188.