summaryrefslogtreecommitdiffstats
path: root/src/libdoxygen.t.in
blob: 58563d1cbd090168e23d384dac2bde5f58d2c5c4 (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#
# 
#
# Copyright (C) 1997-2014 by Dimitri van Heesch.
#
# 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.
#
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
#!
#! doxygen.t: This is a custom template for building Doxygen
#!
#$ IncludeTemplate("lib.t");

LEX        = %%FLEX%%
YACC       = %%BISON%%
PYTHON     = %%PYTHON%%
PERL       = %%PERL%%
INCBUFSIZE = $(PYTHON) increasebuffer.py
GENERATED_SRC = ../generated_src/doxygen
GENERATED_OBJ = ../objects/doxygen

#${
sub GenerateDep {
    my($obj,$src,@deps) = @_;
    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;
        foreach my $dep (@deps) {
	  $text .= " ${linebreak}\n\t\t" . $dep if $dep ne "";
        }
        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;
}
sub GenerateLex {
    my($name,$caseOpt) = @_;
    $text = "\t\$(LEX) ";
    if ($caseOpt) {
        $text .= "-i ";
    }
    $text .= "-P".$name."YY -t ".$name.".l | \$(INCBUFSIZE) > \$(GENERATED_SRC)/".$name.".cpp";
}
#$} 

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

#$ GenerateDep("\$(GENERATED_SRC)/scanner.cpp","scanner.l");
#$ GenerateLex("scanner",0);

#$ GenerateDep("\$(GENERATED_SRC)/code.cpp","code.l");
#$ GenerateLex("code",0);

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

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

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

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

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

#$ GenerateDep("\$(GENERATED_SRC)/tclscanner.cpp","tclscanner.l");
#$ GenerateLex("tclscanner",1);

#$ GenerateDep("\$(GENERATED_SRC)/pre.cpp","pre.l");
#$ GenerateLex("pre",0);

#$ GenerateDep("\$(GENERATED_SRC)/declinfo.cpp","declinfo.l");
#$ GenerateLex("declinfo",0);

#$ GenerateDep("\$(GENERATED_SRC)/defargs.cpp","defargs.l");
#$ GenerateLex("defargs",0);

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

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

#$ GenerateDep("\$(GENERATED_SRC)/commentscan.cpp","commentscan.l");
#$ GenerateLex("commentscan",0);

#$ GenerateDep("\$(GENERATED_SRC)/constexp.cpp","constexp.l","\$(GENERATED_SRC)/ce_parse.h");
#$ GenerateLex("constexp",0);

#$ GenerateDep("\$(GENERATED_SRC)/ce_parse.cpp","constexp.y");
	$(YACC) -l -p constexpYY constexp.y -o \$(GENERATED_SRC)/ce_parse.cpp 

#$ 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

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

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

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

$(GENERATED_SRC)/layout_default.xml.h: layout_default.xml
	$(TO_C_CMD)

../generated_src/doxygen/resources.cpp: res2cc_cmd.py $(wildcard ../templates/html/*)
	$(PYTHON) res2cc_cmd.py ../templates ../generated_src/doxygen/resources.cpp