www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Make Dub output *.di files

reply bitwise <bitwise.pvt gmail.com> writes:
Is it possible to get Dub to output import headers for compiled D 
files?
Mar 09 2019
parent reply bitwise <bitwise.pvt gmail.com> writes:
On Saturday, 9 March 2019 at 18:39:29 UTC, bitwise wrote:
 Is it possible to get Dub to output import headers for compiled 
 D files?
I found this, which almost works: "dflags": [ "-H", "-Hdimport", "-op" ] The only problem is that Dub runs *above* the source directory, resulting in all my import files being nested in /source/.. So can I get Dub to run the compilation from the /source directory instead? Or is there a way to tell Dub to generate the headers for each file some other way?
Mar 09 2019
parent bitwise <bitwise.pvt gmail.com> writes:
On Saturday, 9 March 2019 at 19:08:22 UTC, bitwise wrote:
 On Saturday, 9 March 2019 at 18:39:29 UTC, bitwise wrote:
 Is it possible to get Dub to output import headers for 
 compiled D files?
I found this, which almost works: "dflags": [ "-H", "-Hdimport", "-op" ] The only problem is that Dub runs *above* the source directory, resulting in all my import files being nested in /source/.. So can I get Dub to run the compilation from the /source directory instead? Or is there a way to tell Dub to generate the headers for each file some other way?
For now, I guess this will work: "dflags": [ "-H", "-Hdimport", "-op" ], "postBuildCommands": [ "mv import/source/root_pkg import/root_pkg", "rm -rf import/source" ] A platform independent solution would be preferred.
Mar 09 2019