mkvers.bat 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @if EXIST ..\version.h goto SHOW
  2. @if NOT EXIST ..\version.mk goto ERR1
  3. @if NOT EXIST mkvers1.bat goto ERR2
  4. @echo updating/creating ..\version.h ...
  5. @set TEMP1=1
  6. @for /F "skip=8 tokens=3" %%i in (..\version.mk) do @call mkvers1 %%i
  7. @if "%TEMPX1%." == "." goto NOX1
  8. @if "%TEMPX2%." == "." goto NOX1
  9. @if "%TEMPX3%." == "." goto NOX1
  10. @set TEMP1=..\version.h
  11. @echo #ifndef XMLRPC_C_VERSION_INCLUDED > %TEMP1%
  12. @echo #define XMLRPC_C_VERSION_INCLUDED >> %TEMP1%
  13. @echo /* generated by Windows/mkvers.bat on %DATE% ... */ >> %TEMP1%
  14. @echo #define XMLRPC_C_VERSION "%TEMPX1%.%TEMPX2%.%TEMPX3%" >> %TEMP1%
  15. @echo #define XMLRPC_VERSION_MAJOR %TEMPX1% >> %TEMP1%
  16. @echo #define XMLRPC_VERSION_MINOR %TEMPX2% >> %TEMP1%
  17. @echo #define XMLRPC_VERSION_POINT %TEMPX3% >> %TEMP1%
  18. @echo #endif >> %TEMP1%
  19. type %TEMP1%
  20. @echo ..\version.h set to the above ...
  21. @set TEMP1=
  22. @set TEMPX1=
  23. @set TEMPX2=
  24. @set TEMPX3=
  25. @goto END
  26. :NOX1
  27. @echo Some error occurred in the batch process ...
  28. @goto NOVER
  29. :NOVER
  30. @echo Failed to create ..\version.h .
  31. @pause
  32. @goto END
  33. :ERR1
  34. @echo Can not locate ..\version.mk ... check name, location ...
  35. @pause
  36. @goto END
  37. :ERR2
  38. @echo Can not locate mkvers1.bat ... check name, location ...
  39. @pause
  40. @goto END
  41. :SHOW
  42. @echo ..\version.h already exist, with version ...
  43. @type ..\version.h
  44. @echo Delete this file if you wish to redo it ...
  45. @pause
  46. @goto END
  47. :END