Imported Upstream version 1.51.0
[platform/upstream/boost.git] / tools / build / v2 / tools / doxygen.jam
1 # Copyright 2003, 2004 Douglas Gregor
2 # Copyright 2003, 2004, 2005 Vladimir Prus
3 # Copyright 2006 Rene Rivera
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
7 # This module defines rules to handle generation of various outputs from source
8 # files documented with doxygen comments. The supported transformations are:
9 #
10 # * Source -> Doxygen XML -> BoostBook XML
11 # * Source -> Doxygen HTML
12 #
13 # The type of transformation is selected based on the target requested. For
14 # BoostBook XML, the default, specifying a target with an ".xml" suffix, or an
15 # empty suffix, will produce a <target>.xml and <target>.boostbook. For Doxygen
16 # HTML specifying a target with an ".html" suffix will produce a directory
17 # <target> with the Doxygen html files, and a <target>.html file redirecting to
18 # that directory.
19
20 import "class" : new ;
21 import targets ;
22 import feature ;
23 import property ;
24 import generators ;
25 import boostbook ;
26 import type ;
27 import path ;
28 import print ;
29 import regex ;
30 import stage ;
31 import project ;
32 import xsltproc ;
33 import make ;
34 import os ;
35 import toolset : flags ;
36 import alias ;
37 import common ;
38 import modules ;
39 import project ;
40 import utility ;
41 import errors ;
42
43
44 # Use to specify extra configuration paramters. These get translated
45 # into a doxyfile which configures the building of the docs.
46 feature.feature doxygen:param : : free ;
47
48 # Specify the "<xsl:param>boost.doxygen.header.prefix" XSLT option.
49 feature.feature prefix : : free ;
50
51 # Specify the "<xsl:param>boost.doxygen.reftitle" XSLT option.
52 feature.feature reftitle : : free ;
53
54 # Which processor to use for various translations from Doxygen.
55 feature.feature doxygen.processor : xsltproc doxproc : propagated implicit ;
56
57 # To generate, or not, index sections.
58 feature.feature doxygen.doxproc.index : no yes : propagated incidental ;
59
60 # The ID for the resulting BoostBook reference section.
61 feature.feature doxygen.doxproc.id : : free ;
62
63 # The title for the resulting BoostBook reference section.
64 feature.feature doxygen.doxproc.title : : free ;
65
66 # Location for images when generating XML
67 feature.feature doxygen:xml-imagedir : : free ;
68
69 # Indicates whether the entire directory should be deleted
70 feature.feature doxygen.rmdir : off on : optional incidental ;
71
72 # Doxygen configuration input file.
73 type.register DOXYFILE : doxyfile ;
74
75 # Doxygen XML multi-file output.
76 type.register DOXYGEN_XML_MULTIFILE : xml-dir : XML ;
77
78 # Doxygen XML coallesed output.
79 type.register DOXYGEN_XML : doxygen : XML ;
80
81 # Doxygen HTML multifile directory.
82 type.register DOXYGEN_HTML_MULTIFILE : html-dir : HTML ;
83
84 # Redirection HTML file to HTML multifile directory.
85 type.register DOXYGEN_HTML : : HTML ;
86
87 type.register DOXYGEN_XML_IMAGES : doxygen-xml-images ;
88
89 # Initialize the Doxygen module. Parameters are:
90 #   name: the name of the 'doxygen' executable. If not specified, the name
91 #         'doxygen' will be used
92 #
93 rule init ( name ? )
94 {
95     if ! $(.initialized)
96     {
97         .initialized = true ;
98
99         .doxproc = [ modules.binding $(__name__) ] ;
100         .doxproc = $(.doxproc:D)/doxproc.py ;
101
102         generators.register-composing doxygen.headers-to-doxyfile
103             : H HPP CPP : DOXYFILE ;
104         generators.register-standard doxygen.run
105             : DOXYFILE : DOXYGEN_XML_MULTIFILE ;
106         generators.register-standard doxygen.xml-dir-to-boostbook
107             : DOXYGEN_XML_MULTIFILE : BOOSTBOOK : <doxygen.processor>doxproc ;
108         generators.register-standard doxygen.xml-to-boostbook
109             : DOXYGEN_XML : BOOSTBOOK : <doxygen.processor>xsltproc ;
110         generators.register-standard doxygen.collect
111             : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ;
112         generators.register-standard doxygen.run
113             : DOXYFILE : DOXYGEN_HTML_MULTIFILE ;
114         generators.register-standard doxygen.html-redirect
115             : DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ;
116         generators.register-standard doxygen.copy-latex-pngs
117             : DOXYGEN_HTML : DOXYGEN_XML_IMAGES ;
118
119         IMPORT $(__name__) : doxygen : : doxygen ;
120     }
121
122     if $(name)
123     {
124         modify-config ;
125         .doxygen = $(name) ;
126         check-doxygen ;
127     }
128
129     if ! $(.doxygen)
130     {
131         check-doxygen ;
132     }
133 }
134
135 rule freeze-config ( )
136 {
137     if ! $(.initialized)
138     {
139         errors.user-error "doxygen must be initialized before it can be used." ;
140     }
141     if ! $(.config-frozen)
142     {
143         .config-frozen = true ;
144
145         if [ .is-cygwin ]
146         {
147             .is-cygwin = true ;
148         }
149     }
150 }
151
152 rule modify-config ( )
153 {
154     if $(.config-frozen)
155     {
156         errors.user-error "Cannot change doxygen after it has been used." ;
157     }
158 }
159
160 rule check-doxygen ( )
161 {
162     if --debug-configuration in [ modules.peek : ARGV ]
163     {
164         ECHO "notice:" using doxygen ":" $(.doxygen) ;
165     }
166     local extra-paths ;
167     if [ os.name ] = NT
168     {
169         local ProgramFiles = [ modules.peek : ProgramFiles ] ;
170         if $(ProgramFiles)
171         {
172             extra-paths = "$(ProgramFiles:J= )" ;
173         }
174         else
175         {
176             extra-paths = "C:\\Program Files" ;
177         }
178     }
179     .doxygen = [ common.get-invocation-command doxygen :
180                  doxygen : $(.doxygen) : $(extra-paths) ] ;
181 }
182
183 rule name ( )
184 {
185     freeze-config ;
186     return $(.doxygen) ;
187 }
188
189 rule .is-cygwin ( )
190 {
191     if [ os.on-windows ]
192     {
193         local file = [ path.make [ modules.binding $(__name__) ] ] ;
194         local dir = [ path.native
195                       [ path.join [ path.parent $(file) ] doxygen ] ] ;
196         local command =
197          "cd \"$(dir)\" && \"$(.doxygen)\" windows-paths-check.doxyfile 2>&1" ;
198         result = [ SHELL $(command) ] ;
199         if [ MATCH "(Parsing file /)" : $(result) ]
200         {
201             return true ;
202         }
203     }
204 }
205
206 # Runs Doxygen on the given Doxygen configuration file (the source) to generate
207 # the Doxygen files. The output is dumped according to the settings in the
208 # Doxygen configuration file, not according to the target! Because of this, we
209 # essentially "touch" the target file, in effect making it look like we have
210 # really written something useful to it. Anyone that uses this action must deal
211 # with this behavior.
212 #
213 actions doxygen-action
214 {
215     $(RM) "$(*.XML)" & "$(NAME:E=doxygen)" "$(>)" && echo "Stamped" > "$(<)"
216 }
217
218
219 # Runs the Python doxproc XML processor.
220 #
221 actions doxproc
222 {
223     python "$(DOXPROC)" "--xmldir=$(>)" "--output=$(<)" "$(OPTIONS)" "--id=$(ID)" "--title=$(TITLE)"
224 }
225
226
227 rule translate-path ( path )
228 {
229     freeze-config ;
230     if [ os.on-windows ]
231     {
232         if [ os.name ] = CYGWIN
233         {
234             if $(.is-cygwin)
235             {
236                 return $(path) ;
237             }
238             else
239             {
240                 return $(path:W) ;
241             }
242         }
243         else
244         {
245             if $(.is-cygwin)
246             {
247                 match = [ MATCH ^(.):(.*) : $(path) ] ;
248                 if $(match)
249                 {
250                     return /cygdrive/$(match[1])$(match[2]:T) ;
251                 }
252                 else
253                 {
254                     return $(path:T) ;
255                 }
256             }
257             else
258             {
259                 return $(path) ;
260             }
261         }
262     }
263     else
264     {
265         return $(path) ;
266     }
267 }
268
269
270 # Generates a doxygen configuration file (doxyfile) given a set of C++ sources
271 # and a property list that may contain <doxygen:param> features.
272 #
273 rule headers-to-doxyfile ( target : sources * : properties * )
274 {
275     local text "# Generated by Boost.Build version 2" ;
276
277     local output-dir ;
278
279     # Translate <doxygen:param> into command line flags.
280     for local param in [ feature.get-values <doxygen:param> : $(properties) ]
281     {
282         local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ;
283         if $(namevalue[1]) = OUTPUT_DIRECTORY
284         {
285             output-dir = [ translate-path
286                            [ utility.unquote $(namevalue[2]) ] ] ;
287             text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
288         }
289         else
290         {
291             text += "$(namevalue[1]) = $(namevalue[2])" ;
292         }
293     }
294
295     if ! $(output-dir)
296     {
297         output-dir = [ translate-path [ on $(target) return $(LOCATE) ] ] ;
298         text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
299     }
300
301     local headers = ;
302     for local header in $(sources:G=)
303     {
304         header = [ translate-path $(header) ] ;
305         headers += \"$(header)\" ;
306     }
307
308     # Doxygen generates LaTex by default. So disable it unconditionally, or at
309     # least until someone needs, and hence writes support for, LaTex output.
310     text += "GENERATE_LATEX = NO" ;
311     text += "INPUT = $(headers:J= )" ;
312     print.output $(target) plain ;
313     print.text $(text) : true ;
314 }
315
316
317 # Run Doxygen. See doxygen-action for a description of the strange properties of
318 # this rule.
319 #
320 rule run ( target : source : properties * )
321 {
322     freeze-config ;
323     if <doxygen.rmdir>on in $(properties)
324     {
325         local output-dir =
326             [ path.make
327                 [ MATCH <doxygen:param>OUTPUT_DIRECTORY=\"?([^\"]*) :
328                   $(properties) ] ] ;
329         local html-dir =
330             [ path.make
331                 [ MATCH <doxygen:param>HTML_OUTPUT=(.*) :
332                   $(properties) ] ] ;
333         if $(output-dir) && $(html-dir) &&
334             [ path.glob $(output-dir) : $(html-dir) ]
335         {
336             HTMLDIR on $(target) =
337                 [ path.native [ path.join $(output-dir) $(html-dir) ] ] ;
338             rm-htmldir $(target) ;
339         }
340     }
341     doxygen-action $(target) : $(source) ;
342     NAME on $(target) = $(.doxygen) ;
343     RM on $(target) = [ modules.peek common : RM ] ;
344     *.XML on $(target) =
345         [ path.native
346             [ path.join
347                 [ path.make [ on $(target) return $(LOCATE) ] ]
348                 $(target:B:S=)
349                 *.xml ] ] ;
350 }
351
352 if [ os.name ] = NT
353 {
354     RMDIR = rmdir /s /q ;
355 }
356 else
357 {
358     RMDIR = rm -rf ;
359 }
360
361 actions quietly rm-htmldir
362 {
363     $(RMDIR) $(HTMLDIR)
364 }
365
366 # The rules below require Boost.Book stylesheets, so we need some code to check
367 # that the boostbook module has actualy been initialized.
368 #
369 rule check-boostbook ( )
370 {
371     if ! [ modules.peek boostbook : .initialized ]
372     {
373         ECHO "error: the boostbook module is not initialized" ;
374         ECHO "error: you've attempted to use the 'doxygen' toolset, " ;
375         ECHO "error: which requires Boost.Book," ;
376         ECHO "error: but never initialized Boost.Book." ;
377         EXIT "error: Hint: add 'using boostbook ;' to your user-config.jam" ;
378     }
379 }
380
381
382 # Collect the set of Doxygen XML files into a single XML source file that can be
383 # handled by an XSLT processor. The source is completely ignored (see
384 # doxygen-action), because this action picks up the Doxygen XML index file
385 # xml/index.xml. This is because we can not teach Doxygen to act like a NORMAL
386 # program and take a "-o output.xml" argument (grrrr). The target of the
387 # collection will be a single Doxygen XML file.
388 #
389 rule collect ( target : source : properties * )
390 {
391     check-boostbook ;
392     local collect-xsl-dir
393         = [ path.native [ path.join [ boostbook.xsl-dir ] doxygen collect ] ] ;
394     local source-path
395         = [ path.make [ on $(source) return $(LOCATE) ] ] ;
396     local collect-path
397         = [ path.root [ path.join $(source-path) $(source:B) ] [ path.pwd ] ] ;
398     local native-path
399         = [ path.native $(collect-path) ] ;
400     local real-source
401         = [ path.native [ path.join $(collect-path) index.xml ] ] ;
402     xsltproc.xslt $(target) : $(real-source) $(collect-xsl-dir:S=.xsl)
403         : <xsl:param>doxygen.xml.path=$(native-path) ;
404 }
405
406
407 # Translate Doxygen XML into BoostBook.
408 #
409 rule xml-to-boostbook ( target : source : properties * )
410 {
411     check-boostbook ;
412     local xsl-dir = [ boostbook.xsl-dir ] ;
413     local d2b-xsl = [ path.native [ path.join [ boostbook.xsl-dir ] doxygen
414         doxygen2boostbook.xsl ] ] ;
415
416     local xslt-properties = $(properties) ;
417     for local prefix in [ feature.get-values <prefix> : $(properties) ]
418     {
419         xslt-properties += "<xsl:param>boost.doxygen.header.prefix=$(prefix)" ;
420     }
421     for local title in [ feature.get-values <reftitle> : $(properties) ]
422     {
423         xslt-properties += "<xsl:param>boost.doxygen.reftitle=$(title)" ;
424     }
425
426     xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ;
427 }
428
429
430 flags doxygen.xml-dir-to-boostbook OPTIONS <doxygen.doxproc.index>yes : --enable-index ;
431 flags doxygen.xml-dir-to-boostbook ID <doxygen.doxproc.id> ;
432 flags doxygen.xml-dir-to-boostbook TITLE <doxygen.doxproc.title> ;
433
434
435 rule xml-dir-to-boostbook ( target : source : properties * )
436 {
437     DOXPROC on $(target) = $(.doxproc) ;
438
439     LOCATE on $(source:S=) = [ on $(source) return $(LOCATE) ] ;
440
441     doxygen.doxproc $(target) : $(source:S=) ;
442 }
443
444
445 # Generate the HTML redirect to HTML dir index.html file.
446 #
447 rule html-redirect ( target : source : properties * )
448 {
449     local uri = "$(target:B)/index.html" ;
450     print.output $(target) plain ;
451     print.text
452 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
453     \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
454 <html xmlns=\"http://www.w3.org/1999/xhtml\">
455 <head>
456   <meta http-equiv=\"refresh\" content=\"0; URL=$(uri)\" />
457
458   <title></title>
459 </head>
460
461 <body>
462   Automatic redirection failed, please go to <a href=
463   \"$(uri)\">$(uri)</a>.
464 </body>
465 </html>
466 "
467         : true ;
468 }
469
470 rule copy-latex-pngs ( target : source : requirements * )
471 {
472     local directory = [ path.native
473                         [ feature.get-values <doxygen:xml-imagedir> :
474                           $(requirements) ] ] ;
475
476     local location = [ on $(target) return $(LOCATE) ] ;
477
478     local pdf-location =
479         [ path.native
480             [ path.join
481                 [ path.make $(location) ]
482                 [ path.make $(directory) ] ] ] ;
483     local html-location =
484         [ path.native
485             [ path.join
486                 .
487                 html
488                 [ path.make $(directory) ] ] ] ;
489
490     common.MkDir $(pdf-location) ;
491     common.MkDir $(html-location) ;
492
493     DEPENDS $(target) : $(pdf-location) $(html-location) ;
494
495     if [ os.name ] = NT
496     {
497         CP on $(target) = copy /y ;
498         FROM on $(target) = \\*.png ;
499         TOHTML on $(target) = .\\html\\$(directory) ;
500         TOPDF on $(target) = \\$(directory) ;
501     }
502     else
503     {
504         CP on $(target) = cp ;
505         FROM on $(target) = /*.png ;
506         TOHTML on $(target) = ./html/$(directory) ;
507         TOPDF on $(target) = $(target:D)/$(directory) ;
508     }
509 }
510
511 actions copy-latex-pngs
512 {
513     $(CP) $(>:S=)$(FROM) $(TOHTML)
514     $(CP) $(>:S=)$(FROM) $(<:D)$(TOPDF)
515     echo "Stamped" > "$(<)"
516 }
517
518 # building latex images for doxygen XML depends
519 # on latex, dvips, and ps being in your PATH.
520 # This is true for most Unix installs, but
521 # not on Win32, where you will need to install
522 # MkTex and Ghostscript and add these tools
523 # to your path.
524
525 actions check-latex
526 {
527     latex -version >$(<)
528 }
529
530 actions check-dvips
531 {
532     dvips -version >$(<)
533 }
534
535 if [ os.name ] = "NT"
536 {
537    actions check-gs
538    {
539        gswin32c -version >$(<)
540    }
541 }
542 else
543 {
544    actions check-gs
545    {
546        gs -version >$(<)
547    }
548 }
549
550 rule check-tools ( )
551 {
552     if ! $(.check-tools-targets)
553     {
554         # Find the root project.
555         local root-project = [ project.current ] ;
556         root-project = [ $(root-project).project-module ] ;
557         while
558             [ project.attribute $(root-project) parent-module ] &&
559             [ project.attribute $(root-project) parent-module ] != user-config
560         {
561             root-project =
562                 [ project.attribute $(root-project) parent-module ] ;
563         }
564
565         .latex.check = [ new file-target latex.check
566             :
567             : [ project.target $(root-project) ]
568             : [ new action : doxygen.check-latex ]
569             :
570             ] ;
571         .dvips.check = [ new file-target dvips.check
572             :
573             : [ project.target $(root-project) ]
574             : [ new action : doxygen.check-dvips ]
575             :
576             ] ;
577         .gs.check = [ new file-target gs.check
578             :
579             : [ project.target $(root-project) ]
580             : [ new action : doxygen.check-gs ]
581             :
582             ] ;
583         .check-tools-targets = $(.latex.check) $(.dvips.check) $(.gs.check) ;
584     }
585     return $(.check-tools-targets) ;
586 }
587
588 project.initialize $(__name__) ;
589 project doxygen ;
590
591 class doxygen-check-tools-target-class : basic-target
592 {
593     import doxygen ;
594     rule construct ( name : sources * : property-set )
595     {
596         return [ property-set.empty ] [ doxygen.check-tools ] ;
597     }
598 }
599
600 local project = [ project.current ] ;
601
602 targets.main-target-alternative
603     [ new doxygen-check-tools-target-class check-tools : $(project)
604         : [ targets.main-target-sources : check-tools : no-renaming ]
605         : [ targets.main-target-requirements : $(project) ]
606         : [ targets.main-target-default-build : $(project) ]
607         : [ targets.main-target-usage-requirements : $(project) ]
608     ] ;
609
610 # User-level rule to generate BoostBook XML from a set of headers via Doxygen.
611 #
612 rule doxygen ( target : sources * : requirements * : default-build * : usage-requirements * )
613 {
614     freeze-config ;
615     local project = [ project.current ] ;
616
617     if $(target:S) = .html
618     {
619         # Build an HTML directory from the sources.
620         local html-location = [ feature.get-values <location> : $(requirements) ] ;
621         local output-dir ;
622         if [ $(project).get build-dir ] 
623         {
624             # Explicitly specified build dir. Add html at the end.
625             output-dir = [ path.join [ $(project).build-dir ] $(html-location:E=html) ] ;
626         }
627         else
628         {
629             # Trim 'bin' from implicit build dir, for no other reason that backward
630             # compatibility.
631             output-dir = [ path.join [ path.parent [ $(project).build-dir ] ] 
632               $(html-location:E=html) ] ;
633         }
634         output-dir = [ path.root $(output-dir) [ path.pwd ] ] ;        
635         local output-dir-native = [ path.native $(output-dir) ] ;
636         requirements = [ property.change $(requirements) : <location> ] ;
637
638         ## The doxygen configuration file.
639         targets.main-target-alternative
640             [ new typed-target $(target:S=.tag) : $(project) : DOXYFILE
641                 : [ targets.main-target-sources $(sources) : $(target:S=.tag) ]
642                 : [ targets.main-target-requirements $(requirements)
643                     <doxygen:param>GENERATE_HTML=YES
644                     <doxygen:param>GENERATE_XML=NO
645                     <doxygen:param>"OUTPUT_DIRECTORY=\"$(output-dir-native)\""
646                     <doxygen:param>HTML_OUTPUT=$(target:B)
647                     : $(project) ]
648                 : [ targets.main-target-default-build $(default-build) : $(project) ]
649             ] ;
650         $(project).mark-target-as-explicit $(target:S=.tag) ;
651
652         ## The html directory to generate by running doxygen.
653         targets.main-target-alternative
654             [ new typed-target $(target:S=.dir) : $(project) : DOXYGEN_HTML_MULTIFILE
655                 : $(target:S=.tag)
656                 : [ targets.main-target-requirements $(requirements)
657                     <doxygen:param>"OUTPUT_DIRECTORY=\"$(output-dir-native)\""
658                     <doxygen:param>HTML_OUTPUT=$(target:B)
659                     : $(project) ]
660                 : [ targets.main-target-default-build $(default-build) : $(project) ]
661                 ] ;
662         $(project).mark-target-as-explicit $(target:S=.dir) ;
663
664         ## The redirect html file into the generated html.
665         targets.main-target-alternative
666             [ new typed-target $(target) : $(project) : DOXYGEN_HTML
667                 : $(target:S=.dir)
668                 : [ targets.main-target-requirements $(requirements)
669                     <location>$(output-dir)
670                     : $(project) ]
671                 : [ targets.main-target-default-build $(default-build) : $(project) ]
672                 ] ;
673     }
674     else
675     {
676         # Build a BoostBook XML file from the sources.
677         local location-xml = [ feature.get-values <location> : $(requirements) ] ;
678         requirements = [ property.change $(requirements) : <location> ] ;
679         local target-xml = $(target:B=$(target:B)-xml) ;
680
681         # Check whether we need to build images
682         local images-location =
683             [ feature.get-values <doxygen:xml-imagedir> : $(requirements) ] ;
684         if $(images-location)
685         {
686             doxygen $(target).doxygen-xml-images.html : $(sources)
687                 : $(requirements)
688                   <doxygen.rmdir>on
689                   <doxygen:param>QUIET=YES
690                   <doxygen:param>WARNINGS=NO
691                   <doxygen:param>WARN_IF_UNDOCUMENTED=NO
692                   <dependency>/doxygen//check-tools ;
693             $(project).mark-target-as-explicit
694                 $(target).doxygen-xml-images.html ;
695
696             targets.main-target-alternative
697                 [ new typed-target $(target).doxygen-xml-images
698                     : $(project) : DOXYGEN_XML_IMAGES
699                     : $(target).doxygen-xml-images.html
700                     : [ targets.main-target-requirements $(requirements)
701                         : $(project) ]
702                     : [ targets.main-target-default-build $(default-build)
703                         : $(project) ]
704                 ] ;
705
706             $(project).mark-target-as-explicit
707                 $(target).doxygen-xml-images ;
708
709             if ! [ regex.match "^(.*/)$" : $(images-location) ]
710             {
711                 images-location = $(images-location)/ ;
712             }
713
714             requirements +=
715                 <dependency>$(target).doxygen-xml-images
716                 <xsl:param>boost.doxygen.formuladir=$(images-location) ;
717         }
718
719         ## The doxygen configuration file.
720         targets.main-target-alternative
721             [ new typed-target $(target-xml:S=.tag) : $(project) : DOXYFILE
722                 : [ targets.main-target-sources $(sources) : $(target-xml:S=.tag) ]
723                 : [ targets.main-target-requirements $(requirements)
724                     <doxygen:param>GENERATE_HTML=NO
725                     <doxygen:param>GENERATE_XML=YES
726                     <doxygen:param>XML_OUTPUT=$(target-xml)
727                     : $(project) ]
728                 : [ targets.main-target-default-build $(default-build) : $(project) ]
729             ] ;
730         $(project).mark-target-as-explicit $(target-xml:S=.tag) ;
731
732         ## The Doxygen XML directory of the processed source files.
733         targets.main-target-alternative
734             [ new typed-target $(target-xml:S=.dir) : $(project) : DOXYGEN_XML_MULTIFILE
735                 : $(target-xml:S=.tag)
736                 : [ targets.main-target-requirements $(requirements)
737                     : $(project) ]
738                 : [ targets.main-target-default-build $(default-build) : $(project) ]
739             ] ;
740         $(project).mark-target-as-explicit $(target-xml:S=.dir) ;
741
742         ## The resulting BoostBook file is generated by the processor tool. The
743         ## tool can be either the xsltproc plus accompanying XSL scripts. Or it
744         ## can be the python doxproc.py script.
745         targets.main-target-alternative
746             [ new typed-target $(target-xml) : $(project) : BOOSTBOOK
747                 :  $(target-xml:S=.dir)
748                 : [ targets.main-target-requirements $(requirements)
749                     : $(project) ]
750                 : [ targets.main-target-default-build $(default-build) : $(project) ]
751             ] ;
752         $(project).mark-target-as-explicit $(target-xml) ;
753
754         targets.main-target-alternative
755             [ new install-target-class $(target:S=.xml) : $(project)
756                 : $(target-xml)
757                 : [ targets.main-target-requirements $(requirements)
758                     <location>$(location-xml:E=.)
759                     <name>$(target:S=.xml)
760                     : $(project) ]
761                 : [ targets.main-target-default-build $(default-build) : $(project) ]
762             ] ;
763         $(project).mark-target-as-explicit $(target:S=.xml) ;
764
765         targets.main-target-alternative
766             [ new alias-target-class $(target) : $(project)
767                 :
768                 : [ targets.main-target-requirements $(requirements)
769                     : $(project) ]
770                 : [ targets.main-target-default-build $(default-build) : $(project) ]
771                 : [ targets.main-target-usage-requirements $(usage-requirements)
772                     <dependency>$(target:S=.xml)
773                     : $(project) ]
774             ] ;
775     }
776 }