Boost logo

Boost-Build :

Subject: Re: [Boost-build] doxygen.jam generates wrong INPUTs in doxyfile
From: Vladimir Prus (ghost_at_[hidden])
Date: 2014-02-01 12:48:04


On 30.01.2014 19:21, Simon Cooke wrote:
> Given the following simple project, the doxygen target fails to find
> the source file when invoked from the Jamroot directory as 'b2
> src//file.html':
>
> *** Jamroot:
> project : build-dir _build ;
>
> *** src/Jamfile:
> import doxygen : doxygen ;
> doxygen file.html : file.h ;
>
> *** src/file.h:
> /* empty */
>
> ... giving...
>
> Warning: tag INPUT: input source `file.h' does not exist
>
> In the doxyfile, the following line is generated:
>
> INPUT = "file.h"
>
> which is invalid when doxygen is invoked from the parent directory.
>
> In doxygen.jam (line 310) this is currently generated as follows:
>
> for local header in $(sources:G=)
> {
> header = [ translate-path $(header) ] ;
> headers += \"$(header)\" ;
> }
>
> The following change seems to fix the problem for me:
>
> for local header in $(sources)
> {
> header = [ path.native [ path.root [ path.make $(header:G=) ]
> [ on $(header) return
> $(SEARCH) ] ] ] ;
> header = [ translate-path $(header) ] ;
> headers += \"$(header)\" ;
> }
>
> Is this the correct way to fix this issue?

Hi Simon,

I think it's a right approach, with just a minor improvement. Looking at existing code,
e.g. in link.jam:do-link-recursively, I see this pattern:

            local source-path = [ on $(source) return $(LOCATE) ] [ on $(source) return $(SEARCH) ] ;
            local absolute-source = [ path.root
                         [ path.root [ path.make $(source:G=) ]
                     [ path.make $(source-path[1]) ] ]
                 [ path.pwd ] ] ;

Which will both in cases where the source is result of some other action, and where it has directory
component.

Maybe this code can be extracted in a function and used in doxygen.jam? Pull requests welcome ;-)

Thanks,
Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk