mk_version.bat 1.2 KB

12345678910111213141516171819202122
  1. @echo off
  2. SET VERTMP=mkvertmp.bat
  3. del %VERTMP%
  4. rem create version.h from configure.ac / version.h.in using grep, sed and helper batchfile
  5. set ROOT=..\..
  6. echo @ECHO OFF> %VERTMP%
  7. grep -e "^[^ ]*VERSION=" %ROOT%\configure.ac | sed -e "s/^/SET /;">> %VERTMP%
  8. echo if %%EXTRA_VERSION%%x==x%%EXTRA_VERSION%% goto RELEASE>> %VERTMP%
  9. echo if %%EXTRA_VERSION%%==0 goto RELEASE>> %VERTMP%
  10. echo SET VERSION=%%MAJOR_VERSION%%.%%MINOR_VERSION%%.%%MICRO_VERSION%%cvs%%EXTRA_VERSION%%%%EXTRA_GTK2_VERSION%%%%EXTRA_WIN32_VERSION%% Win32 (GTK2)>> %VERTMP%
  11. echo goto VERSIONEND>> %VERTMP%
  12. echo :RELEASE>> %VERTMP%
  13. echo SET EXTRA_VERSION=0>> %VERTMP%
  14. echo SET VERSION=%%MAJOR_VERSION%%.%%MINOR_VERSION%%.%%MICRO_VERSION%%%%EXTRA_GTK2_VERSION%%%%EXTRA_WIN32_VERSION%% Win32 (GTK2)>> %VERTMP%
  15. echo :VERSIONEND>> %VERTMP%
  16. echo sed -e "s/@PACKAGE@/sylpheed-claws/;s/@VERSION@/%%VERSION%%/;s/@MAJOR_VERSION@/%%MAJOR_VERSION%%/;s/@MINOR_VERSION@/%%MINOR_VERSION%%/;s/@MICRO_VERSION@/%%MICRO_VERSION%%/;s/@EXTRA_VERSION@/%%EXTRA_VERSION%%/;s/@EXTRA_WIN32_VERSION@/%%EXTRA_WIN32_VERSION%%/;" %ROOT%\src\common\version.h.in>> %VERTMP%
  17. type %VERTMP%
  18. call %VERTMP% > %ROOT%\src\common\version.h
  19. del %VERTMP%
  20. set ROOT=
  21. SET VERTMP=