summaryrefslogtreecommitdiffstats
path: root/recipes-ti/codec-engine/ti-dmai/arago-tdox
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-ti/codec-engine/ti-dmai/arago-tdox')
-rw-r--r--recipes-ti/codec-engine/ti-dmai/arago-tdox210
1 files changed, 0 insertions, 210 deletions
diff --git a/recipes-ti/codec-engine/ti-dmai/arago-tdox b/recipes-ti/codec-engine/ti-dmai/arago-tdox
deleted file mode 100644
index 81538cf3..00000000
--- a/recipes-ti/codec-engine/ti-dmai/arago-tdox
+++ /dev/null
@@ -1,210 +0,0 @@
1#!/bin/bash
2#
3#
4# This script sets a series of environment variable that are referenced
5# in a doxygen configuration file. The values passed in here are simply
6# plugged into the file locations and doxygen proceeds normaly.
7#
8# template location is ${VENDORS}/opensource/doxygen/templates/<version>
9#
10#
11
12# Revision history
13#! 02 Jul 2009 cring: Added cmd line args for doxygendir (-x) and template (-t)
14#! 13 Jul 2006 ada: New template smaller pdf generation
15#! 16 May 2006 ada: Added -p file to pdf for space in project names
16#! 08 May 2006 ada: Added pdf generation to tdox (Solaris/Linux only).
17#! 23 Jan 2006 ada: Overide file to change default doxyfile behaivior
18#! 19 Jan 2006 ada: 1093, ENUM_VALUES_PER_LINE set to 1, ref doxyfile via vers
19#! 05 Oct 2005 ada: 933, doxyfile in tools, removed win and unix vendors path
20#! 24 Aug 2005 ada: Added 897 changes, optional css c or jave optimization
21#! 18 Aug 2005 ada: inital version from AR 887
22
23# Set these defaults here as the usage statement uses them
24TDOX_TEMPLATEDIR=${TOOLS}/default/doxygen_templates
25DOXYGEN_EXECUTABLE=doxygen
26
27function usage
28{
29 OPTIONS="`basename $0` code_location out_doc_location [-x doxygen_exe ] [-t tdox_templatedir] [-n project_name] [-v version] [-f FILE_PATTERNS ] [-s strip_dir] [-c css location] [-e exclude dirs] [-b enabled sections] [-m generate chm] [-p pdf_file] [-o override doxyfile] [-j]"
30 echo "`basename $1` $OPTIONS"
31 echo "Where: "
32 echo "\tcode_location: Top of tree(s) to search for code (required as 1st param)"
33 echo "\tout_doc_location: Output location for generated files (required as 2nd param)"
34 echo "\t[-n project_name]: title of generated documentation (defaults to Project)"
35 echo "\t[-x doxygen_exe]: location of doxygen executable (defaults to $DOXYGEN_EXECUTABLE)"
36 echo "\t[-t tdox_templatedir]: location of tdox templates (defaults to $TDOX_TEMPLATEDIR)"
37 echo "\t[-v version]: version number or string (defaults to 1.0)"
38 echo "\t[-f FILE_PATTERNS]: Optional list of files to document (defaults to all)"
39 echo "\t[-s strip_dirs]: Remove directory prefix from generated files (defaults to not remove)"
40 echo "\t[-c path_to_css]: Path to a user suplied CSS style sheet"
41 echo "\t[-e exclude dirs]: List of directories to exclude"
42 echo "\t[-b enabled sections]: List of sections to enable"
43 echo "\t[-m generate chm]: chm file name (required)"
44 echo "\t[-p generate pdf <file>]: create <file>.pdf in html/pdf (Linux only)"
45 echo "\t[-o override doxyfile]: file (advanced) Overide any doxyfile default"
46 echo "\t[-j]: Optimize for Java (Generate class files) defaults to C"
47 echo "\t[-r]: Call rshd to windows for chm generation (defaults to wine)"
48 echo
49 exit
50}
51
52function optimizeForJava
53{
54 DOX_OPTIMIZE_OUTPUT_JAVA="YES"
55 DOX_OPTIMIZE_OUTPUT_FOR_C="NO"
56}
57
58if [ "$#" -lt 2 ]; then
59 echo "Invalid number of parameters"
60 usage $0
61fi
62
63# get the required parameters then shift for the getopts parameters
64export DOX_INPUT="$1"
65shift
66export DOX_OUTPUT_DIRECTORY="$1"
67shift
68
69#set the global defaults
70DOX_QUIET="YES"
71DOX_OPTIMIZE_OUTPUT_JAVA="NO"
72DOX_OPTIMIZE_OUTPUT_FOR_C="YES"
73DOX_CHM_FILE=
74DOX_GENERATE_HTMLHELP="NO"
75OVERRIDE_FILE=""
76PDF=""
77
78# Process the rest of the arguments as getopts
79# parameters
80while getopts b:c:e:f:m:n:o:p:s:t:v:x:dhjr arg
81do
82 case $arg in
83 b) DOX_ENABLED_SECTIONS=${OPTARG};;
84 c) DOX_HTML_STYLESHEET=${OPTARG};;
85 d) DEBUG=1;;
86 e) DOX_EXCLUDE=${OPTARG};;
87 f) DOX_FILE_PATTERNS=${OPTARG};;
88 h) usage;exit 0;;
89 j) optimizeForJava;;
90 r) USERSHD=1;;
91 m) DOX_CHM_FILE=${OPTARG};DOX_GENERATE_HTMLHELP="YES";;
92 n) DOX_PROJECT_NAME=${OPTARG};;
93 s) DOX_STRIP_FROM_PATH=${OPTARG};;
94 t) TDOX_TEMPLATEDIR=${OPTARG};;
95 v) DOX_PROJECT_NUMBER=${OPTARG};;
96 x) DOXYGEN_EXECUTABLE=${OPTARG};;
97 o) OVERRIDE_FILE=${OPTARG};;
98 p) PDF=${OPTARG};;
99 \?) usage
100 exit 2;;
101 esac
102done
103
104if [ "$DEBUG" = "1" ]; then
105 DOX_QUIET="NO"
106 set -x
107fi
108
109if [ "$DOX_PROJECT_NAME" = "" ]; then
110 DOX_PROJECT_NAME="Project"
111fi
112
113if [ "$DOX_PROJECT_NUMBER" = "" ]; then
114 DOX_PROJECT_NUMBER="1.0"
115fi
116
117if [ "$DOX_FILE_PATTERNS" = "" ]; then
118 DOX_FILE_PATTERNS="*.c \
119 *.cc \
120 *.cxx \
121 *.cpp \
122 *.c++ \
123 *.d \
124 *.java \
125 *.ii \
126 *.ixx \
127 *.ipp \
128 *.i++ \
129 *.inl \
130 *.h \
131 *.hh \
132 *.hxx \
133 *.hpp \
134 *.h++ \
135 *.idl \
136 *.odl \
137 *.cs \
138 *.php \
139 *.php3 \
140 *.inc \
141 *.m \
142 *.mm \
143 *.dox"
144fi
145
146export DOX_INPUT
147export DOX_OUTPUT_DIRECTORY
148export DOX_PROJECT_NAME
149export DOX_PROJECT_NUMBER
150export DOX_FILE_PATTERNS
151export DOX_STRIP_FROM_PATH
152export DOX_QUIET
153export DOX_HTML_STYLESHEET
154export DOX_OPTIMIZE_OUTPUT_FOR_C
155export DOX_OPTIMIZE_OUTPUT_JAVA
156export DOX_EXCLUDE
157export DOX_ENABLED_SECTIONS
158export DOX_CHM_FILE
159export DOX_GENERATE_HTMLHELP
160export TDOX_TEMPLATEDIR
161
162
163# Make sure the dir exists
164mkdir -p $DOX_OUTPUT_DIRECTORY
165
166# Create temp file copy of doxyfile and append overrides to the end of the file
167cp ${TDOX_TEMPLATEDIR}/doxyfile /tmp/doxyfile$$
168
169chmod +w /tmp/doxyfile$$
170if [ "$OVERRIDE_FILE" != "" ]; then
171 cat $OVERRIDE_FILE >> /tmp/doxyfile$$
172fi
173
174# Run doxygen and clean up temp file
175${DOXYGEN_EXECUTABLE} /tmp/doxyfile$$
176rm -f /tmp/doxyfile$$
177
178# Copy the TI banner gifs to the html directory.
179cp -p ${TDOX_TEMPLATEDIR}/*gif $DOX_OUTPUT_DIRECTORY/html
180
181# Generate PDF files
182if [ "$PDF" != "" ]; then
183 if [ "$BUILD_HOST_OS" = "Linux" ]; then
184 rm -rf $DOX_OUTPUT_DIRECTORY/html/pdf
185 mkdir -p $DOX_OUTPUT_DIRECTORY/html/pdf
186 cwd=`pwd`
187 cd $DOX_OUTPUT_DIRECTORY/latex
188 latex refman.tex
189 makeindex refman.idx
190 latex refman.tex
191 latex_count=5
192 while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ]
193 do
194 latex refman.tex
195 latex_count=`expr $$latex_count - 1`
196 done
197 dvips -o refman.ps refman.dvi
198 ps2pdf refman.ps refman.pdf
199 cd $cwd
200 mv $DOX_OUTPUT_DIRECTORY/latex/refman.pdf $DOX_OUTPUT_DIRECTORY/html/pdf/${PDF}.pdf
201 else
202 echo "Sorry... pdf generation supported under Linux only"
203 fi
204fi
205
206# Generate Windows compressed help
207if [ "$DOX_GENERATE_HTMLHELP" = "YES" ]; then
208
209 echo "chm generation is not supported"
210fi