libdoxygen.t.in 6.2 KB
Newer Older
Dimitri van Heesch's avatar
Dimitri van Heesch committed
1
#
2
# 
Dimitri van Heesch's avatar
Dimitri van Heesch committed
3
#
Dimitri van Heesch's avatar
Dimitri van Heesch committed
4
# Copyright (C) 1997-2014 by Dimitri van Heesch.
Dimitri van Heesch's avatar
Dimitri van Heesch committed
5 6 7 8 9 10 11
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby 
# granted. No representations are made about the suitability of this software 
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
#
Dimitri van Heesch's avatar
Dimitri van Heesch committed
12 13
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
Dimitri van Heesch's avatar
Dimitri van Heesch committed
14 15 16
#!
#! doxygen.t: This is a custom template for building Doxygen
#!
17
#$ IncludeTemplate("lib.t");
Dimitri van Heesch's avatar
Dimitri van Heesch committed
18

19 20
LEX        = %%FLEX%%
YACC       = %%BISON%%
21 22 23
PYTHON     = %%PYTHON%%
PERL       = %%PERL%%
INCBUFSIZE = $(PYTHON) increasebuffer.py
24
GENERATED_SRC = ../generated_src/doxygen
25
GENERATED_OBJ = ../objects/doxygen
Dimitri van Heesch's avatar
Dimitri van Heesch committed
26 27 28

#${
sub GenerateDep {
29
    my($obj,$src,@deps) = @_;
Dimitri van Heesch's avatar
Dimitri van Heesch committed
30 31 32 33 34 35 36 37
    my(@objv,$srcv,$i,$s,$o,$d,$c);
    @objv = split(/\s+/,$obj);
    @srcv = split(/\s+/,$src);
    for $i ( 0..$#objv ) {
        $s = $srcv[$i];
        $o = $objv[$i];
        next if $s eq "";
        $text .= $o . ": " . $s;
38 39 40
        foreach my $dep (@deps) {
	  $text .= " ${linebreak}\n\t\t" . $dep if $dep ne "";
        }
Dimitri van Heesch's avatar
Dimitri van Heesch committed
41 42 43 44 45 46 47 48 49
        if ( $moc_output{$s} ne "" ) {
            $text .= " ${linebreak}\n\t\t" . $moc_output{$s};
        }
        $d = &make_depend($s);
        $text .= " ${linebreak}\n\t\t" . $d if $d ne "";
	$text .= "\n";
    }
    chop $text;
}
50 51 52 53 54 55
sub GenerateLex {
    my($name,$caseOpt) = @_;
    $text = "\t\$(LEX) ";
    if ($caseOpt) {
        $text .= "-i ";
    }
56
    $text .= "-P".$name."YY -t ".$name.".l | \$(INCBUFSIZE) > \$(GENERATED_SRC)/".$name.".cpp";
57
}
Dimitri van Heesch's avatar
Dimitri van Heesch committed
58 59 60 61
#$} 

####################

62
#$ GenerateDep("\$(GENERATED_SRC)/scanner.cpp","scanner.l");
63
#$ GenerateLex("scanner",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
64

65
#$ GenerateDep("\$(GENERATED_SRC)/code.cpp","code.l");
66
#$ GenerateLex("code",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
67

68
#$ GenerateDep("\$(GENERATED_SRC)/pyscanner.cpp","pyscanner.l");
69
#$ GenerateLex("pyscanner",0);
70

71
#$ GenerateDep("\$(GENERATED_SRC)/pycode.cpp","pycode.l");
72
#$ GenerateLex("pycode",0);
73

74
#$ GenerateDep("\$(GENERATED_SRC)/fortranscanner.cpp","fortranscanner.l");
75
#$ GenerateLex("fortranscanner",1);
76

77
#$ GenerateDep("\$(GENERATED_SRC)/fortrancode.cpp","fortrancode.l");
78
#$ GenerateLex("fortrancode",1);
79

80
#$ GenerateDep("\$(GENERATED_SRC)/vhdlcode.cpp","vhdlcode.l");
81
#$ GenerateLex("vhdlcode",1);
82

83
#$ GenerateDep("\$(GENERATED_SRC)/tclscanner.cpp","tclscanner.l");
84
#$ GenerateLex("tclscanner",1);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
85

86
#$ GenerateDep("\$(GENERATED_SRC)/pre.cpp","pre.l");
87
#$ GenerateLex("pre",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
88

89
#$ GenerateDep("\$(GENERATED_SRC)/declinfo.cpp","declinfo.l");
90
#$ GenerateLex("declinfo",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
91

92
#$ GenerateDep("\$(GENERATED_SRC)/defargs.cpp","defargs.l");
93
#$ GenerateLex("defargs",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
94

95
#$ GenerateDep("\$(GENERATED_SRC)/doctokenizer.cpp","doctokenizer.l");
96
#$ GenerateLex("doctokenizer",0);
97

98
#$ GenerateDep("\$(GENERATED_SRC)/commentcnv.cpp","commentcnv.l");
99
#$ GenerateLex("commentcnv",0);
100

101
#$ GenerateDep("\$(GENERATED_SRC)/commentscan.cpp","commentscan.l");
102
#$ GenerateLex("commentscan",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
103

104
#$ GenerateDep("\$(GENERATED_SRC)/constexp.cpp","constexp.l","\$(GENERATED_SRC)/ce_parse.h");
105
#$ GenerateLex("constexp",0);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
106

107 108
#$ GenerateDep("\$(GENERATED_SRC)/ce_parse.cpp","constexp.y");
	$(YACC) -l -p constexpYY constexp.y -o \$(GENERATED_SRC)/ce_parse.cpp 
Dimitri van Heesch's avatar
Dimitri van Heesch committed
109

110 111 112
#$ GenerateDep("\$(GENERATED_SRC)/ce_parse.h","constexp.y");
	$(YACC) -l -d -p ce_parsexpYY constexp.y -o \$(GENERATED_SRC)/ce_parse.c 
	-rm $(GENERATED_SRC)/ce_parse.c
113

114
#$ GenerateDep("\$(GENERATED_SRC)/vhdlscanner.cpp","vhdlscanner.l");
115
#$ GenerateLex("vhdlscanner",1);
116

117
TO_C_CMD=$(PYTHON) to_c_cmd.py < $< > $@
118

119
#$ GenerateDep("layout.cpp","\$(GENERATED_SRC)/layout_default.xml.h");
120

121
#$ GenerateDep("cite.cpp","\$(GENERATED_SRC)/doxygen.bst.h","\$(GENERATED_SRC)/bib2xhtml.pl.h");
122

123
#$ GenerateDep("ftvhelp.cpp","\$(GENERATED_SRC)/navtree.js.h","\$(GENERATED_SRC)/resize.js.h","\$(GENERATED_SRC)/navtree.css.h");
124

125
#$ GenerateDep("htmlgen.cpp","\$(GENERATED_SRC)/header.html.h","\$(GENERATED_SRC)/footer.html.h","\$(GENERATED_SRC)/doxygen.css.h","\$(GENERATED_SRC)/search_functions.php.h","\$(GENERATED_SRC)/search_opensearch.php.h","\$(GENERATED_SRC)/search.css.h","\$(GENERATED_SRC)/jquery_p1.js.h","\$(GENERATED_SRC)/jquery_p2.js.h","\$(GENERATED_SRC)/jquery_p3.js.h","\$(GENERATED_SRC)/jquery_ui.js.h","\$(GENERATED_SRC)/jquery_fx.js.h","\$(GENERATED_SRC)/jquery_pt.js.h","\$(GENERATED_SRC)/svgpan.js.h","\$(GENERATED_SRC)/dynsections.js.h","\$(GENERATED_SRC)/extsearch.js.h");
126

127
#$ GenerateDep("xmlgen.cpp","\$(GENERATED_SRC)/index.xsd.h","\$(GENERATED_SRC)/compound.xsd.h");
128

129
#$ GenerateDep("latexgen.cpp","\$(GENERATED_SRC)/doxygen.sty.h");
130

131
#$ GenerateDep("searchindex.cpp","\$(GENERATED_SRC)/search.js.h");
132

133
$(GENERATED_SRC)/index.xsd.h: index.xsd
134
	$(TO_C_CMD)
135

136
$(GENERATED_SRC)/compound.xsd.h: compound.xsd
137
	$(TO_C_CMD)
138

139
$(GENERATED_SRC)/layout_default.xml.h: layout_default.xml
140
	$(TO_C_CMD)
Dimitri van Heesch's avatar
Dimitri van Heesch committed
141

142
$(GENERATED_SRC)/header.html.h: header.html
143
	$(TO_C_CMD)
144

145
$(GENERATED_SRC)/footer.html.h: footer.html
146
	$(TO_C_CMD)
Dimitri van Heesch's avatar
Dimitri van Heesch committed
147

148
$(GENERATED_SRC)/search_functions.php.h: search_functions.php
149
	$(TO_C_CMD)
150

151
$(GENERATED_SRC)/search_opensearch.php.h: search_opensearch.php
152
	$(TO_C_CMD)
153

154
$(GENERATED_SRC)/search.js.h: search.js
155
	$(TO_C_CMD)
156

157
$(GENERATED_SRC)/search.css.h: search.css
158
	$(TO_C_CMD)
159

160
$(GENERATED_SRC)/extsearch.js.h: extsearch.js
161
	$(TO_C_CMD)
162

163
$(GENERATED_SRC)/doxygen.css.h: doxygen.css
164
	$(TO_C_CMD)
165

166 167
$(GENERATED_SRC)/doxygen.sty.h: doxygen.sty
	$(TO_C_CMD)
168

169
$(GENERATED_SRC)/navtree.js.h: navtree.js
170
	$(TO_C_CMD)
Dimitri van Heesch's avatar
Dimitri van Heesch committed
171

172
$(GENERATED_SRC)/resize.js.h: resize.js
173
	$(TO_C_CMD)
174

175
$(GENERATED_SRC)/jquery_p1.js.h: jquery_p1.js
176
	$(TO_C_CMD)
177

178
$(GENERATED_SRC)/jquery_p2.js.h: jquery_p2.js
179
	$(TO_C_CMD)
180

181
$(GENERATED_SRC)/jquery_p3.js.h: jquery_p3.js
182
	$(TO_C_CMD)
183

184
$(GENERATED_SRC)/jquery_ui.js.h: jquery_ui.js
185
	$(TO_C_CMD)
186

187
$(GENERATED_SRC)/jquery_fx.js.h: jquery_fx.js
188
	$(TO_C_CMD)
189

190
$(GENERATED_SRC)/jquery_pt.js.h: jquery_pt.js
191
	$(TO_C_CMD)
192

193
$(GENERATED_SRC)/navtree.css.h: navtree.css
194
	$(TO_C_CMD)
195

196
$(GENERATED_SRC)/svgpan.js.h: svgpan.js
197 198
	$(TO_C_CMD)

199
$(GENERATED_SRC)/dynsections.js.h: dynsections.js
200 201
	$(TO_C_CMD)

202
$(GENERATED_SRC)/doxygen.bst.h: doxygen.bst
203 204
	$(TO_C_CMD)

205
$(GENERATED_SRC)/bib2xhtml.pl.h: bib2xhtml.pl
206 207
	$(TO_C_CMD)

208 209
$(GENERATED_SRC)/version.cpp: ../configure
	$(PYTHON) version.py $(GENERATED_SRC)