D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8808 - Header generation must recreate folder structure if -Hd is used
Summary: Header generation must recreate folder structure if -Hd is used
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
: 4495 (view as issue list)
Depends on:
Blocks:
 
Reported: 2012-10-12 17:24 UTC by Andrej Mitrovic
Modified: 2015-06-09 01:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2012-10-12 17:24:33 UTC
Currently regardless of the -Hd switch the compiler will output all header files as flat files in a single folder:

$ dmd -H -o- atk/Action.d gio/DBusProxy.d -Hdinclude

Expected result:

include/atk/Action.d
include/gio/DBusProxy.d

Actual result:

include/Action.d
include/DBusProxy.d

These files are completely unusable like this, they must be stored in the original folder layout or they can't be imported.

Using a build script to compile them one by one and using -Hf is *NOT* an option because this considerably slows down header generation (for example GtkD header generation can take almost 10 minutes by doing it on a file-by-file basis).

To avoid accidentally storing the .di files in the same place as the D files I propose that folder layout recreation should only occur if the -Hd flag is set.
Comment 1 Andrej Mitrovic 2012-10-13 06:50:11 UTC
It turns out -op does this. It's not very well documented though, I'll file a different bug for that.
Comment 2 Andrej Mitrovic 2012-11-02 05:59:22 UTC
*** Issue 4495 has been marked as a duplicate of this issue. ***