adding simple doc build script
authorsheepluva
Tue, 25 Oct 2011 03:00:08 +0200
changeset 6203 38ddad39f08f
parent 6202 8e3f006b9b1e
child 6204 80cd75daf80f
adding simple doc build script
QTfrontend/Doxyfile
tools/docgen.sh
--- a/QTfrontend/Doxyfile	Mon Oct 24 23:24:01 2011 +0200
+++ b/QTfrontend/Doxyfile	Tue Oct 25 03:00:08 2011 +0200
@@ -31,7 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.9.17-dev
+PROJECT_NUMBER         = $(PROJECT_NUMBER)
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
 
@@ -49,7 +49,7 @@
 # If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = ../doc/QTfrontend
+OUTPUT_DIRECTORY       = $(OUTPUT_DIRECTORY)
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/docgen.sh	Tue Oct 25 03:00:08 2011 +0200
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+
+if [ -d QTfrontend ]; then
+	cd QTfrontend
+else
+	if [ -d ../QTfrontend ]; then
+		cd ../QTfrontend
+	else
+		echo 'abort: Directory "QTfrontend" not found!' >&2
+		exit 1
+	fi
+fi
+
+if [ -z "$1" ]; then
+	OUTPUT_DIRECTORY="../doc/QTfrontend"
+else
+	OUTPUT_DIRECTORY="$1"
+fi
+
+echo "Creating documentation for Qt-Frontend in $OUTPUT_DIRECTORY ..."
+
+if [ $(which hg) ]; then
+
+branch=$(hg identify -b)
+rev=$(hg identify -rdefault -i)
+
+branchurl="<a href=http://code.google.com/p/hedgewars/source/list?name=${branch}>${branch}</a>"
+revurl="<a href=http://code.google.com/p/hedgewars/source/detail?r=${rev}>${rev}</a>"
+
+export PROJECT_NUMBER="${branchurl} as of ${revurl}"
+export OUTPUT_DIRECTORY
+
+fi
+
+doxygen
+exit $?