Thread overview
ddoc - modules with same name
Nov 13, 2013
rumbu
Nov 13, 2013
Jonathan M Davis
Nov 13, 2013
rumbu
Nov 13, 2013
Gary Willoughby
Jul 02, 2015
armando sano
Jul 02, 2015
Gary Willoughby
November 13, 2013
Let's suppose I have a module structure:

- package.module1.core
- package.module2.core

Building documentation with dmd will generate a sigle core.html file with content related only to package.module2.core, overwriting the first one.

Is there any way that dmd can recreate directory structure for documentation, obtaining two files: package\module1\core.html and package\module2\core.html?
November 13, 2013
On Wednesday, November 13, 2013 08:27:45 rumbu wrote:
> Let's suppose I have a module structure:
> 
> - package.module1.core
> - package.module2.core
> 
> Building documentation with dmd will generate a sigle core.html file with content related only to package.module2.core, overwriting the first one.
> 
> Is there any way that dmd can recreate directory structure for documentation, obtaining two files: package\module1\core.html and package\module2\core.html?

You could do it by compiling each module individually and giving it the appropriate target directory, but you'd have thought that it would be designed to output that way in the first place. AFAIK though, there's no way to get it to do that. And if there is in fact no such way, then I'd argue that it's quite deserving of an enhancement request:

https://d.puremagic.com/issues

- Jonathan M Davis
November 13, 2013
> AFAIK though, there's no way to get it
> to do that. And if there is in fact no such way, then I'd argue that it's
> quite deserving of an enhancement request:
>
> https://d.puremagic.com/issues
>
> - Jonathan M Davis

Thanks, but I just "discovered" the "-op" command line argument who does exactly this.
November 13, 2013
On Wednesday, 13 November 2013 at 16:39:11 UTC, rumbu wrote:
>> AFAIK though, there's no way to get it
>> to do that. And if there is in fact no such way, then I'd argue that it's
>> quite deserving of an enhancement request:
>>
>> https://d.puremagic.com/issues
>>
>> - Jonathan M Davis
>
> Thanks, but I just "discovered" the "-op" command line argument who does exactly this.

I could never get this working. Have you got an example of your compiler command.
July 02, 2015
> I could never get this working. Have you got an example of your compiler command.

In case that's still helpful after a couple of years...:

    dmd path1/to/source.d path2/to/source.d -o- -D -Ddpath/to/doc -op

generates `path/to/doc/path1/to/source.html` and `path/to/doc/path2/to/source.html`
July 02, 2015
On Thursday, 2 July 2015 at 06:33:42 UTC, armando sano wrote:
>> I could never get this working. Have you got an example of your compiler command.
>
> In case that's still helpful after a couple of years...:
>
>     dmd path1/to/source.d path2/to/source.d -o- -D -Ddpath/to/doc -op
>
> generates `path/to/doc/path1/to/source.html` and `path/to/doc/path2/to/source.html`

In my case it was a bug in rdmd that ate the flag. I corrected it in a PR ages ago which was merged so it now works! :)