summaryrefslogtreecommitdiffstats
path: root/winbuild
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-04-04 19:21:30 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-04-04 19:21:30 (GMT)
commit124b4621e793d9ffa3eca3ee91cdb6ded37c553e (patch)
tree7a75c44b7316473c088e10330f85f18dfabcd70c /winbuild
parentbd691d38fe61aed85189a6675668a67deefd8002 (diff)
downloadDoxygen-124b4621e793d9ffa3eca3ee91cdb6ded37c553e.zip
Doxygen-124b4621e793d9ffa3eca3ee91cdb6ded37c553e.tar.gz
Doxygen-124b4621e793d9ffa3eca3ee91cdb6ded37c553e.tar.bz2
Batch file to generate VERSION and version.cpp from the configure script
Diffstat (limited to 'winbuild')
-rw-r--r--winbuild/version.bat24
1 files changed, 24 insertions, 0 deletions
diff --git a/winbuild/version.bat b/winbuild/version.bat
new file mode 100644
index 0000000..ce3ded6
--- /dev/null
+++ b/winbuild/version.bat
@@ -0,0 +1,24 @@
+@for /F "tokens=1* delims== " %%i in (..\configure) do @call :oneline "%%i" "%%j"
+@if "%mnt%"=="NO" goto :writereleaseversion
+@goto :writecvsversion
+
+:oneline
+@if "-%~1"=="-doxygen_version_major" call :aset major %2
+@if "-%~1"=="-doxygen_version_minor" call :aset minor %2
+@if "-%~1"=="-doxygen_version_revision" call :aset revision %2
+@if "-%~1"=="-doxygen_version_mmn" call :aset mnt %2
+@goto :EOF
+
+:aset
+@set %1=%~2
+@goto :EOF
+
+:writecvsversion
+echo %major%.%minor%.%revision%-%mnt%>..\VERSION
+echo char versionString[]="%major%.%minor%.%revision%-%mnt%";>..\src\version.cpp
+@goto :EOF
+
+:writereleaseversion
+echo %major%.%minor%.%revision%>..\VERSION
+echo char versionString[]="%major%.%minor%.%revision%";>..\src\version.cpp
+@goto :EOF