Dub recursive build and forcing pre-build commands to run

Antonio Corbi via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 9 00:52:56 PDT 2016


On Saturday, 9 July 2016 at 00:03:22 UTC, Meta wrote:
> I have two questions.
>
> 1. Is it possible to build subpackages when dub build is 
> invoked for the main package? It's a pain to first do dub build 
> :mysubpackage and then dub build.
>
> 2. It seems that when dub detects that no dependencies need to 
> be updated, it does not run the pre-build commands. I have some 
> pre-build commands that generate data to be imported by the 
> main package and thus must always be run for a build. Is there 
> a way to specify this?

I use the "preGenerateCommands" and "dependencies" like this:

     "configurations" : [
         {
             "comment"             : "Classic app.",
             "name"                : "eqapp",
             "preGenerateCommands" : ["sed -e 
's#topdir/#$PACKAGE_DIR#' src/config/constants.d.in > 
src/config/constants.d"],
             "dependencies"        : {":dgtalib" : "*", 
"gtk-d:gtkd": "~>3.3.0"},
         },
       ....

Hope this helps you.
Antonio


More information about the Digitalmars-d-learn mailing list