Ticket #2025: doxygen.jam.patch

File doxygen.jam.patch, 2.7 KB (added by Steven Watanabe, 14 years ago)
  • doxygen.jam

     
    3737import alias ;
    3838import common ;
    3939import modules ;
     40import quote ;
    4041
    4142# Use to specify extra configuration paramters. These get translated
    4243# into a doxyfile which configures the building of the docs.
     
    199200    for local param in [ feature.get-values <doxygen:param> : $(properties) ]
    200201    {
    201202        local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ;
    202         text += "$(namevalue[1]) = $(namevalue[2])" ;
     203        local value = [ quote.double-quote $(namevalue[2]) ] ;
     204        text += "$(namevalue[1]) = $(value)" ;
    203205        if $(namevalue[1]) = OUTPUT_DIRECTORY
    204206        {
    205             output-dir = "$(namevalue[2])" ;
     207            output-dir = $(value) ;
    206208        }
    207209    }
    208210   
    209211    if ! $(output-dir)
    210212    {
    211         output-dir = [ on $(target) return $(LOCATE) ] ;
     213        output-dir = [ quote.double-quote [ on $(target) return $(LOCATE) ] ] ;
    212214        text += "OUTPUT_DIRECTORY = $(output-dir)" ;
    213215    }
    214216
    215     local headers = "" ;
     217    # Doxygen generates LaTex by default. So disable it unconditionally,
     218    # or at least until someone needs, and hence writes support for, LaTex
     219    # output.
     220    text += "GENERATE_LATEX = NO" ;
     221
     222    local first = true ;
     223
     224    local current = "" ;
     225
    216226    for local source in $(sources:G=)
    217227    {
    218         headers = "$(headers) $(source)" ;
     228        if $(first)
     229        {
     230            first = ;
     231            local quoted_source = [ quote.double-quote $(source) ] ;
     232            current = "INPUT = $(quoted_source)" ;
     233        }
     234        else
     235        {
     236            text += "$(current) \\" ;
     237            local quoted_source = [ quote.double-quote $(source) ] ;
     238            current = "  $(quoted_source)" ;
     239        }
    219240    }
    220241
    221     # Doxygen generates LaTex by default. So disable it unconditionally,
    222     # or at least until someone needs, and hence writes support for, LaTex
    223     # output.
    224     text += "GENERATE_LATEX = NO" ;
    225     text += "INPUT = $(headers) " ;
     242    text += $(current) ;
     243
    226244    print.output $(target) plain ;
    227245    print.text $(text) : true ;
    228246}
     
    278296        = [ path.join [ path.pwd ] $(source-path) $(source:B) ] ;
    279297    local real-source
    280298        = [ path.native [ path.join [ path.native $(collect-path) ] index.xml ] ] ;
    281     xsltproc.xslt $(target) : $(real-source) $(collect-xsl-dir:S=.xsl)
    282         : <xsl:param>doxygen.xml.path=$(collect-path)
     299    local real-collect-path
     300        = [ regex.replace $(collect-path) " " "%%20" ] ;
     301    xsltproc.xslt $(target) : "$(real-source)" "$(collect-xsl-dir:S=.xsl)"
     302        : <xsl:param>doxygen.xml.path=$(real-collect-path)
    283303        ;
    284304}
    285305