forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkdoc
More file actions
executable file
·91 lines (76 loc) · 1.62 KB
/
mkdoc
File metadata and controls
executable file
·91 lines (76 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#! /bin/sh
#
# $Id: //poco/1.4/release/script/mkdoc#2 $
#
# mkdoc
#
# Create reference documentation for a POCO release.
# This is a wrapper for mkdocumentation that syncs to the
# Perforce head revision, reads the current
# version from $POCO_BASE/VERSION and requires a release
# specification (loaded from $POCO_BASE/release/spec/*.release)
# as argument.
#
# usage: mkdoc [-l <perforce-label>] [<specfile>]
#
if [ "$POCO_BASE" = "" ] ; then
echo "Error: POCO_BASE not set."
exit 1
fi
spec=""
docConfig=$POCO_BASE/PocoDoc/cfg/mkdoc-poco.xml
while [ "$1" != "" ] ;
do
if [ "$1" = "-C" ] ; then
shift
docConfig=$1
shift
elif [ "$1" = "-v" ] ; then
shift
version=$1
shift
else
spec=$1
shift
fi
done
if [ "$spec" != "" ] ; then
relspec="-f release/spec/${spec}.release"
tag="-$spec"
reltag="-t $spec"
else
relspec=""
reltag=""
tag=""
fi
cd $POCO_BASE
if [ ! -f VERSION ] ; then
echo "Error: No VERSION file found."
exit 2
fi
if [ "$version" = "" ] ; then
read version <$POCO_BASE/VERSION
fi
release=$version$tag
#
# Build release
#
echo "Building tools"
tools=$POCO_BASE/stage/tools
rm -rf $tools
mkdir -p $tools
mkrelease -o $tools $version CppParser PocoDoc
cd $tools
./configure --no-tests --no-samples
make -s -j8
cd $POCO_BASE
osname=`uname -s | tr ' ' '_'`
osarch=`uname -m | tr ' ' '_'`
if [ $osname = "Darwin" ] ; then
archpath=`dirname stage/tools/PocoDoc/bin/Darwin/*/PocoDoc`
osarch=`basename $archpath`
fi
export PATH=$tools/PocoDoc/bin/$osname/$osarch:$PATH
echo PATH=$PATH
echo "Building documentation $release (using $docConfig)"
mkdocumentation $reltag $relspec -C $docConfig -v $version