diff options
Diffstat (limited to 'recipes-ti/codec-engine/ti-dmai/arago-tdox')
-rw-r--r-- | recipes-ti/codec-engine/ti-dmai/arago-tdox | 210 |
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 | ||
24 | TDOX_TEMPLATEDIR=${TOOLS}/default/doxygen_templates | ||
25 | DOXYGEN_EXECUTABLE=doxygen | ||
26 | |||
27 | function 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 | |||
52 | function optimizeForJava | ||
53 | { | ||
54 | DOX_OPTIMIZE_OUTPUT_JAVA="YES" | ||
55 | DOX_OPTIMIZE_OUTPUT_FOR_C="NO" | ||
56 | } | ||
57 | |||
58 | if [ "$#" -lt 2 ]; then | ||
59 | echo "Invalid number of parameters" | ||
60 | usage $0 | ||
61 | fi | ||
62 | |||
63 | # get the required parameters then shift for the getopts parameters | ||
64 | export DOX_INPUT="$1" | ||
65 | shift | ||
66 | export DOX_OUTPUT_DIRECTORY="$1" | ||
67 | shift | ||
68 | |||
69 | #set the global defaults | ||
70 | DOX_QUIET="YES" | ||
71 | DOX_OPTIMIZE_OUTPUT_JAVA="NO" | ||
72 | DOX_OPTIMIZE_OUTPUT_FOR_C="YES" | ||
73 | DOX_CHM_FILE= | ||
74 | DOX_GENERATE_HTMLHELP="NO" | ||
75 | OVERRIDE_FILE="" | ||
76 | PDF="" | ||
77 | |||
78 | # Process the rest of the arguments as getopts | ||
79 | # parameters | ||
80 | while getopts b:c:e:f:m:n:o:p:s:t:v:x:dhjr arg | ||
81 | do | ||
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 | ||
102 | done | ||
103 | |||
104 | if [ "$DEBUG" = "1" ]; then | ||
105 | DOX_QUIET="NO" | ||
106 | set -x | ||
107 | fi | ||
108 | |||
109 | if [ "$DOX_PROJECT_NAME" = "" ]; then | ||
110 | DOX_PROJECT_NAME="Project" | ||
111 | fi | ||
112 | |||
113 | if [ "$DOX_PROJECT_NUMBER" = "" ]; then | ||
114 | DOX_PROJECT_NUMBER="1.0" | ||
115 | fi | ||
116 | |||
117 | if [ "$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" | ||
144 | fi | ||
145 | |||
146 | export DOX_INPUT | ||
147 | export DOX_OUTPUT_DIRECTORY | ||
148 | export DOX_PROJECT_NAME | ||
149 | export DOX_PROJECT_NUMBER | ||
150 | export DOX_FILE_PATTERNS | ||
151 | export DOX_STRIP_FROM_PATH | ||
152 | export DOX_QUIET | ||
153 | export DOX_HTML_STYLESHEET | ||
154 | export DOX_OPTIMIZE_OUTPUT_FOR_C | ||
155 | export DOX_OPTIMIZE_OUTPUT_JAVA | ||
156 | export DOX_EXCLUDE | ||
157 | export DOX_ENABLED_SECTIONS | ||
158 | export DOX_CHM_FILE | ||
159 | export DOX_GENERATE_HTMLHELP | ||
160 | export TDOX_TEMPLATEDIR | ||
161 | |||
162 | |||
163 | # Make sure the dir exists | ||
164 | mkdir -p $DOX_OUTPUT_DIRECTORY | ||
165 | |||
166 | # Create temp file copy of doxyfile and append overrides to the end of the file | ||
167 | cp ${TDOX_TEMPLATEDIR}/doxyfile /tmp/doxyfile$$ | ||
168 | |||
169 | chmod +w /tmp/doxyfile$$ | ||
170 | if [ "$OVERRIDE_FILE" != "" ]; then | ||
171 | cat $OVERRIDE_FILE >> /tmp/doxyfile$$ | ||
172 | fi | ||
173 | |||
174 | # Run doxygen and clean up temp file | ||
175 | ${DOXYGEN_EXECUTABLE} /tmp/doxyfile$$ | ||
176 | rm -f /tmp/doxyfile$$ | ||
177 | |||
178 | # Copy the TI banner gifs to the html directory. | ||
179 | cp -p ${TDOX_TEMPLATEDIR}/*gif $DOX_OUTPUT_DIRECTORY/html | ||
180 | |||
181 | # Generate PDF files | ||
182 | if [ "$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 | ||
204 | fi | ||
205 | |||
206 | # Generate Windows compressed help | ||
207 | if [ "$DOX_GENERATE_HTMLHELP" = "YES" ]; then | ||
208 | |||
209 | echo "chm generation is not supported" | ||
210 | fi | ||