home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Fortran.51 / DISK5 / STARTUP.CM$ / STARTUP.bin
Text File  |  1991-02-01  |  2KB  |  87 lines

  1. echo off
  2. REM
  3. REM Copyright (c) 1986-1991, Microsoft Corporation.  All rights reserved.
  4. REM
  5. REM batch file used to invoke make file to build startup
  6. REM    Usage:    startup [os] (models)
  7. REM        [os] is an optional parameter specifying the operating
  8. REM            system:  use either "DOS" or "OS2", if neither is
  9. REM            given, both are built
  10. REM        (models) is a blank separated list of memory
  11. REM        model designators as follows:
  12. REM            M:    medium model
  13. REM            L:    large model
  14. REM    Example:
  15. REM        startup OS2 M L
  16. REM            builds medium and large model objects for OS/2
  17. REM            and links with null fortran program
  18.  
  19. if NOT "%1" == "" goto firstdir
  20. echo    Usage: startup [os] (models)
  21. echo    [os] is an optional operating system designator, either
  22. echo        DOS or OS2
  23. echo    (models) is a blank separated list of memory
  24. echo    model designators as follows:
  25. echo        M:    medium model
  26. echo        L:    large model
  27. echo    Example:
  28. echo        startup DOS M L
  29. echo        builds medium and large model DOS objects and
  30. echo        links with null fortran program
  31. goto end
  32.  
  33. :firstdir
  34. SET TARGET=all
  35.  
  36. if "%1" == "DOS" goto dos
  37. if not "%1" == "dos" goto notdos
  38. :dos
  39. SET TARGET=DOS
  40. shift
  41. goto nextdir
  42.  
  43. :notdos
  44. if "%1" == "OS2" goto os2
  45. if not "%1" == "os2" goto notos2
  46. :os2
  47. SET TARGET=OS2
  48. shift
  49. goto nextdir
  50.  
  51. :notos2
  52. :nextdir
  53. if "%1" == "" goto finished
  54.  
  55. if "%1" == "M" goto argok
  56. if "%1" == "L" goto argok
  57. echo off
  58. echo    Error:     invalid argument to startup.bat
  59. echo        The valid arguments to startup.cmd are M, L, DOS and OS2.
  60. echo        The model designators must be upper case.
  61. goto end
  62.  
  63. :argok
  64. echo You may see directory creation errors -- ignore these.
  65. echo on
  66. mkdir %1
  67. mkdir %1\dos
  68. mkdir %1\os2
  69. cd %1
  70. nmake CINC=%INCLUDE% MODEL=%1 %TARGET% /F ..\makefile
  71. IF ERRORLEVEL 1 goto failure
  72.  
  73. cd ..
  74.  
  75. shift
  76. goto nextdir
  77.  
  78. :failure
  79. echo off
  80. ECHO *** startup build/link failed ***
  81.  
  82. :finished
  83. set TARGET=
  84. echo **** Finished
  85.  
  86. :end
  87.