Re: Dub recursive build and forcing pre-build commands to run
On Sunday, 10 July 2016 at 07:00:18 UTC, Meta wrote: On Saturday, 9 July 2016 at 07:52:56 UTC, Antonio Corbi wrote: 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 When are pre-generate commands run? Official docs say this: preGenerateCommands string[] A list of shell commands that is executed before project generation is started If my memory serves me well I started to use it instead of preBuildCommands because they are always executed and, in my case, I needed that (to simulate the autoconf/cmake 'file.in -> file' idiom). Antonio
Re: Dub recursive build and forcing pre-build commands to run
On Saturday, 9 July 2016 at 07:52:56 UTC, Antonio Corbi wrote: 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 When are pre-generate commands run?
Re: Dub recursive build and forcing pre-build commands to run
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
Dub recursive build and forcing pre-build commands to run
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?