# # # # 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/*) $(wildcard ../templates/xml) $(wildcard ../templates/latex) $(PYTHON) res2cc_cmd.py ../templates ../generated_src/doxygen/resources.cpp