Fix for UBSan build
[platform/upstream/doxygen.git] / src / libdoxygen.t.in
1 #
2 # $Id: libdoxygen.t,v 1.1 2001/03/19 19:27:41 root Exp $
3 #
4 # Copyright (C) 1997-2012 by Dimitri van Heesch.
5 #
6 # Permission to use, copy, modify, and distribute this software and its
7 # documentation under the terms of the GNU General Public License is hereby 
8 # granted. No representations are made about the suitability of this software 
9 # for any purpose. It is provided "as is" without express or implied warranty.
10 # See the GNU General Public License for more details.
11 #
12 # Documents produced by Doxygen are derivative works derived from the
13 # input used in their production; they are not affected by this license.
14 #!
15 #! doxygen.t: This is a custom template for building Doxygen
16 #!
17 #$ IncludeTemplate("lib.t");
18
19 LEX        = %%FLEX%%
20 YACC       = %%BISON%%
21 INCBUFSIZE = $(PERL) increasebuffer.pl
22
23 #${
24 sub GenerateDep {
25     my($obj,$src,$dep) = @_;
26     my(@objv,$srcv,$i,$s,$o,$d,$c);
27     @objv = split(/\s+/,$obj);
28     @srcv = split(/\s+/,$src);
29     for $i ( 0..$#objv ) {
30         $s = $srcv[$i];
31         $o = $objv[$i];
32         next if $s eq "";
33         $text .= $o . ": " . $s;
34         $text .= " ${linebreak}\n\t\t" . $dep if $dep ne "";
35         if ( $moc_output{$s} ne "" ) {
36             $text .= " ${linebreak}\n\t\t" . $moc_output{$s};
37         }
38         $d = &make_depend($s);
39         $text .= " ${linebreak}\n\t\t" . $d if $d ne "";
40         $text .= "\n";
41     }
42     chop $text;
43 }
44 #$} 
45
46 ####################
47
48 #$ GenerateDep("scanner.cpp","scanner.l");
49         $(LEX) -PscanYY -t scanner.l | $(INCBUFSIZE) >scanner.cpp
50
51 #$ GenerateDep("code.cpp","code.l");
52         $(LEX) -PcodeYY -t code.l | $(INCBUFSIZE) >code.cpp
53
54 #$ GenerateDep("pyscanner.cpp","pyscanner.l");
55         $(LEX) -PpyscanYY -t pyscanner.l | $(INCBUFSIZE) >pyscanner.cpp
56
57 #$ GenerateDep("pycode.cpp","pycode.l");
58         $(LEX) -PpycodeYY -t pycode.l | $(INCBUFSIZE) >pycode.cpp
59
60 #$ GenerateDep("fortranscanner.cpp","fortranscanner.l");
61         $(LEX) -i -PfscanYY -t fortranscanner.l | $(INCBUFSIZE) >fortranscanner.cpp
62
63 #$ GenerateDep("fortrancode.cpp","fortrancode.l");
64         $(LEX) -i -PfcodeYY -t fortrancode.l | $(INCBUFSIZE) >fortrancode.cpp
65
66 #$ GenerateDep("vhdlcode.cpp","vhdlcode.l");
67         $(LEX) -i -PvhdlcodeYY -t vhdlcode.l | $(INCBUFSIZE) >vhdlcode.cpp
68
69 #$ GenerateDep("tclscanner.cpp","tclscanner.l");
70         $(LEX) -i -PtclscanYY -t tclscanner.l | $(INCBUFSIZE) >tclscanner.cpp
71
72 #$ GenerateDep("pre.cpp","pre.l");
73         $(LEX) -PpreYY -t pre.l | $(INCBUFSIZE) >pre.cpp 
74
75 #$ GenerateDep("declinfo.cpp","declinfo.l");
76         $(LEX) -PdeclinfoYY -t declinfo.l | $(INCBUFSIZE) >declinfo.cpp
77
78 #$ GenerateDep("defargs.cpp","defargs.l");
79         $(LEX) -PdefargsYY -t defargs.l | $(INCBUFSIZE) >defargs.cpp
80
81 #$ GenerateDep("doctokenizer.cpp","doctokenizer.l");
82         $(LEX) -PdoctokenizerYY -t doctokenizer.l | $(INCBUFSIZE) >doctokenizer.cpp
83
84 #$ GenerateDep("commentcnv.cpp","commentcnv.l");
85         $(LEX) -PcommentcnvYY -t commentcnv.l | $(INCBUFSIZE) >commentcnv.cpp
86
87 #$ GenerateDep("commentscan.cpp","commentscan.l");
88         $(LEX) -PcommentScanYY -t commentscan.l | $(INCBUFSIZE) >commentscan.cpp
89
90 #$ GenerateDep("ce_lex.cpp","constexp.l","ce_parse.h");
91         $(LEX) -PcppExpYY -t constexp.l | $(INCBUFSIZE) >ce_lex.cpp 
92
93 #$ GenerateDep("ce_parse.cpp","constexp.y");
94         $(YACC) -l -p cppExpYY constexp.y -o ce_parse.cpp 
95
96 #$ GenerateDep("ce_parse.h","constexp.y");
97         $(YACC) -l -d -p cppExpYY constexp.y -o ce_parse.c 
98         -rm ce_parse.c
99
100 #$ GenerateDep("vhdlscanner.cpp","vhdlscanner.l","vhdlparser.h");
101         $(LEX) -i -PvhdlScanYY -t vhdlscanner.l | $(INCBUFSIZE) >vhdlscanner.cpp
102
103 #$ GenerateDep("vhdlparser.cpp","vhdlparser.y");
104         $(YACC) -l -p vhdlScanYY vhdlparser.y -o vhdlparser.cpp         
105
106 #$ GenerateDep("vhdlparser.h","vhdlparser.y");
107         $(YACC) -l -d -p vhdlScanYY vhdlparser.y -o vhdlparser.c 
108         -rm vhdlparser.c        
109         
110 #$ GenerateDep("layout.cpp","layout_default.h");
111
112 TO_C_CMD=sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g"
113
114 index_xsd.h: index.xsd
115         cat index.xsd | $(TO_C_CMD) >index_xsd.h 
116
117 compound_xsd.h: compound.xsd
118         cat compound.xsd | $(TO_C_CMD) >compound_xsd.h 
119
120 layout_default.h: layout_default.xml
121         cat layout_default.xml | $(TO_C_CMD) >layout_default.h 
122
123 header_html.h: header.html
124         cat header.html | $(TO_C_CMD) >header_html.h
125
126 footer_html.h: footer.html
127         cat footer.html | $(TO_C_CMD) >footer_html.h
128
129 search_functions_php.h: search_functions.php
130         cat search_functions.php | $(TO_C_CMD) >search_functions_php.h 
131
132 search_opensearch_php.h: search_opensearch.php
133         cat search_opensearch.php | $(TO_C_CMD) >search_opensearch_php.h 
134
135 search_js.h: search.js
136         cat search.js | $(TO_C_CMD) >search_js.h 
137
138 search_css.h: search.css
139         cat search.css | $(TO_C_CMD) >search_css.h 
140
141 doxygen_css.h: doxygen.css
142         cat doxygen.css | $(TO_C_CMD) >doxygen_css.h 
143
144 navtree_js.h: navtree.js
145         cat navtree.js | $(TO_C_CMD) >navtree_js.h
146
147 navindex_js.h: navindex.js
148         cat navindex.js | $(TO_C_CMD) >navindex_js.h
149
150 resize_js.h: resize.js
151         cat resize.js | $(TO_C_CMD) >resize_js.h
152
153 jquery_p1_js.h: jquery_p1.js
154         cat jquery_p1.js | $(TO_C_CMD) >jquery_p1_js.h
155
156 jquery_p2_js.h: jquery_p2.js
157         cat jquery_p2.js | $(TO_C_CMD) >jquery_p2_js.h
158
159 jquery_p3_js.h: jquery_p3.js
160         cat jquery_p3.js | $(TO_C_CMD) >jquery_p3_js.h
161
162 jquery_ui_js.h: jquery_ui.js
163         cat jquery_ui.js | $(TO_C_CMD) >jquery_ui_js.h
164
165 jquery_fx_js.h: jquery_fx.js
166         cat jquery_fx.js | $(TO_C_CMD) >jquery_fx_js.h
167
168 navtree_css.h: navtree.css
169         cat navtree.css | $(TO_C_CMD) >navtree_css.h
170
171 svgpan_js.h: svgpan.js
172         cat svgpan.js | $(TO_C_CMD) >svgpan_js.h
173
174 dynsections_js.h: dynsections.js
175         cat dynsections.js | $(TO_C_CMD) >dynsections_js.h
176
177 doxygen_bst.h: doxygen.bst
178         cat doxygen.bst | $(TO_C_CMD) >doxygen_bst.h
179
180 bib2xhtml.h: bib2xhtml.pl
181         cat bib2xhtml.pl | $(TO_C_CMD) >bib2xhtml.h
182
183