home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / odbcsdk / samples / admndemo / build.bat < prev    next >
Encoding:
DOS Batch File  |  1994-12-07  |  1.9 KB  |  105 lines

  1. @echo off
  2. rem =======================================================================
  3. rem
  4. rem     BUILD.BAT
  5. rem
  6. rem     Builds demo application
  7. rem
  8. rem     Syntax: build [debug16 / ndebug16 / debug32 /ndebug32]
  9. rem
  10. rem =======================================================================
  11. rem
  12.  
  13.  
  14. rem --- Check for environment space ---
  15. set typ=d16
  16. set ok=N
  17.  
  18. if NOT "%ok%" == "N" goto err_env
  19.  
  20.  
  21. rem --- Parse arguments ---
  22. :parse
  23. if "%1" == "" goto check
  24. if "%1" == "clean" goto clean
  25. if "%1" == "debug16" goto debug16
  26. if "%1" == "debug32" goto debug32
  27. if "%1" == "ndebug16" goto ndebug16
  28. if "%1" == "ndebug32" goto ndebug32
  29. shift
  30. goto parse
  31.  
  32. rem --- Handle "clean" ---
  33. :clean
  34. set CLEAN=Y
  35. shift
  36. goto parse
  37.  
  38. rem --- Handle "debug16" ---
  39. :debug16
  40. if "%ok%" == "Y" goto err_usage
  41. set ok=Y
  42. set typ=d16
  43. shift
  44. goto parse
  45.  
  46. rem --- Handle "debug32" ---
  47. :debug32
  48. if "%ok%" == "Y" goto err_usage
  49. set ok=Y
  50. set typ=d32
  51. shift
  52. goto parse
  53.  
  54. rem --- Handle "ndebug16" ---
  55. :ndebug16
  56. if "%ok%" == "Y" goto err_usage
  57. set ok=Y
  58. set typ=n16
  59. shift
  60. goto parse
  61.  
  62. rem --- Handle "ndebug32" ---
  63. :ndebug32
  64. if "%ok%" == "Y" goto err_usage
  65. set ok=Y
  66. set typ=n32
  67. shift
  68. goto parse
  69.  
  70. rem --- Verify correctness of everything ---
  71. :check
  72. if NOT "%ok%" == "Y" goto err_usage
  73. goto doit
  74.  
  75. rem --- Make the demo ---
  76. :doit
  77. if "%typ%" == "n16" nmake
  78. if "%typ%" == "d16" nmake DEBUG=YES
  79. if "%typ%" == "n32" nmake WIN32=YES
  80. if "%typ%" == "d32" nmake WIN32=YES DEBUG=YES
  81. goto end
  82.  
  83. rem --- Out of environment space ---
  84. :err_env
  85. echo.
  86. echo Error: out of environment space
  87. echo.
  88. goto end
  89.  
  90. rem --- Usage message ---
  91. :err_usage
  92. echo.
  93. echo Usage: BUILD [debug16 / ndebug16 / debug32 / ndebug32]
  94. echo.
  95. echo     Note: Make sure that your Windows and ODBC SDK environment
  96. echo        is setup properly.
  97. echo.
  98. goto end
  99.  
  100. rem --- Clear environment variables ---
  101. :end
  102. set typ=
  103. set ok=
  104. set clean=
  105.