Ticket #1165: doxygen.jam.patch

File doxygen.jam.patch, 2.2 KB (added by Steven Watanabe, 15 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.
     
    212213        text += "OUTPUT_DIRECTORY = $(output-dir)" ;
    213214    }
    214215
    215     local headers = "" ;
    216     for local source in $(sources:G=)
     216    # Translate <doxygen:param> into command line flags.
     217    for local param in [ feature.get-values <doxygen:param> : $(properties) ]
    217218    {
    218         headers = "$(headers) $(source)" ;
     219        local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ;
     220        text += "$(namevalue[1]) = $(namevalue[2])" ;
    219221    }
    220222
    221223    # Doxygen generates LaTex by default. So disable it unconditionally,
    222224    # or at least until someone needs, and hence writes support for, LaTex
    223225    # output.
    224226    text += "GENERATE_LATEX = NO" ;
    225     text += "INPUT = $(headers) " ;
     227
     228    local first = true ;
     229
     230    local current = "" ;
     231
     232    for local source in $(sources:G=)
     233    {
     234        if $(first)
     235        {
     236            first = ;
     237            local quoted_source = [ quote.quote_string $(source) ] ;
     238            current = "INPUT = $(quoted_source)" ;
     239        }
     240        else
     241        {
     242            text += "$(current) \\" ;
     243            local quoted_source = [ quote.quote_string $(source) ] ;
     244            current = "  $(quoted_source)" ;
     245        }
     246    }
     247
     248    text += $(current) ;
     249
    226250    print.output $(target) plain ;
    227251    print.text $(text) : true ;
    228252}
     
    278302        = [ path.join [ path.pwd ] $(source-path) $(source:B) ] ;
    279303    local real-source
    280304        = [ 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)
     305    local real-collect-path
     306        = [ regex.replace $(collect-path) " " "%%20" ] ;
     307    xsltproc.xslt $(target) : "$(real-source)" "$(collect-xsl-dir:S=.xsl)"
     308        : <xsl:param>doxygen.xml.path=$(real-collect-path)
    283309        ;
    284310}
    285311