digitalmars.D.learn - Makefiles and dub
- Anonymouse (10/10) Nov 04 2022 [#20699](https://issues.dlang.org/show_bug.cgi?id=20699) must be
- H. S. Teoh (19/29) Nov 04 2022 [...]
- Steven Schveighoffer (4/15) Nov 04 2022 `dub describe` can give you probably enough information to build a makef...
- rikki cattermole (9/9) Nov 05 2022 We have a few build formats that dub can generate for you automatically:
- Imperatorn (3/13) Nov 05 2022 Wait, dub can generate all those? I only knew about visuald
- rikki cattermole (4/18) Nov 05 2022 build is just dub and doesn't emit any project files.
- Guillaume Piolat (4/6) Nov 05 2022 Using the first two all the time.
- =?UTF-8?Q?Christian_K=c3=b6stlin?= (4/15) Nov 05 2022 If cmake works, then cmake could generate a normal makefile :)
- Mathias LANG (7/17) Nov 08 2022 That bug is fixed for the last 3 releases (not including the
https://issues.dlang.org/show_bug.cgi?id=20699) must be non-trivial to fix, so I'm exploring makefiles. If possible I'd like to keep dub for dependency management though, just not for actual compilation. Is it at all possible (or even desireable) to construct a makefile that builds dependencies from outside of the source tree (namely `$HOME/.dub/packages/package_with_unknown_version-1.2.[0-9]+/`)? Does anyone have an example `Makefile` I could dissect? Thanks.
Nov 04 2022
On Fri, Nov 04, 2022 at 11:19:17PM +0000, Anonymouse via Digitalmars-d-learn wrote:https://issues.dlang.org/show_bug.cgi?id=20699) must be non-trivial to fix, so I'm exploring makefiles. If possible I'd like to keep dub for dependency management though, just not for actual compilation. Is it at all possible (or even desireable) to construct a makefile that builds dependencies from outside of the source tree (namely `$HOME/.dub/packages/package_with_unknown_version-1.2.[0-9]+/`)? Does anyone have an example `Makefile` I could dissect?[...] Don't have a Makefile to show, but I've done the following in the past when I have dub dependencies but need to use my own build system: - Create a subdirectory containing a dummy empty dub project (containing nothing but an empty main()), whose sole purpose is to declare dub dependencies that I need. - Run dub to retrieve and compile said dependencies, with --vverbose so that shows the actual compile commands (for extracting the pathnames of the compiled artifacts). - Copy-n-paste the compiled objects paths into my build system as object files / libraries to link against. In theory, the second step above can be automatically parsed to extract the needed paths, or even recompile after altering the command-line options, but I never got that far because I've since shelved the project (for reasons unrelated to dub). T -- Holding a grudge is like drinking poison and hoping the other person dies. -- seen on the 'Net
Nov 04 2022
On 11/4/22 7:19 PM, Anonymouse wrote:https://issues.dlang.org/show_bug.cgi?id=20699) must be non-trivial to fix, so I'm exploring makefiles. If possible I'd like to keep dub for dependency management though, just not for actual compilation. Is it at all possible (or even desireable) to construct a makefile that builds dependencies from outside of the source tree (namely `$HOME/.dub/packages/package_with_unknown_version-1.2.[0-9]+/`)? Does anyone have an example `Makefile` I could dissect? Thanks.`dub describe` can give you probably enough information to build a makefile. And I believe it should do all the dependency fetching when you call it. -Steve
Nov 04 2022
We have a few build formats that dub can generate for you automatically: ``` visuald - VisualD project files sublimetext - SublimeText project file cmake - CMake build scripts build - Builds the package directly ``` Unfortunately none of them are make, it would be nice to have that if you are looking to contribute!
Nov 05 2022
On Saturday, 5 November 2022 at 11:38:09 UTC, rikki cattermole wrote:We have a few build formats that dub can generate for you automatically: ``` visuald - VisualD project files sublimetext - SublimeText project file cmake - CMake build scripts build - Builds the package directly ``` Unfortunately none of them are make, it would be nice to have that if you are looking to contribute!Wait, dub can generate all those? I only knew about visuald
Nov 05 2022
On 06/11/2022 1:16 AM, Imperatorn wrote:On Saturday, 5 November 2022 at 11:38:09 UTC, rikki cattermole wrote:build is just dub and doesn't emit any project files. But yes, it has two others (although idk how much they get used, or how complete).We have a few build formats that dub can generate for you automatically: ``` visuald - VisualD project files sublimetext - SublimeText project file cmake - CMake build scripts build - Builds the package directly ``` Unfortunately none of them are make, it would be nice to have that if you are looking to contribute!Wait, dub can generate all those? I only knew about visuald
Nov 05 2022
On Saturday, 5 November 2022 at 12:17:14 UTC, rikki cattermole wrote:But yes, it has two others (although idk how much they get used, or how complete).Using the first two all the time. IIRC VisualD projects respect --combined
Nov 05 2022
On 05.11.22 12:38, rikki cattermole wrote:We have a few build formats that dub can generate for you automatically: ``` visuald - VisualD project files sublimetext - SublimeText project file cmake - CMake build scripts build - Builds the package directly ``` Unfortunately none of them are make, it would be nice to have that if you are looking to contribute!If cmake works, then cmake could generate a normal makefile :) Kind regards, Christian
Nov 05 2022
On Friday, 4 November 2022 at 23:19:17 UTC, Anonymouse wrote:https://issues.dlang.org/show_bug.cgi?id=20699) must be non-trivial to fix, so I'm exploring makefiles. If possible I'd like to keep dub for dependency management though, just not for actual compilation.That bug is fixed for the last 3 releases (not including the current one in progress), that is, since v1.26.0.Is it at all possible (or even desireable) to construct a makefile that builds dependencies from outside of the source tree (namely `$HOME/.dub/packages/package_with_unknown_version-1.2.[0-9]+/`)? Does anyone have an example `Makefile` I could dissect? Thanks.In the past, I used https://github.com/sociomantic-tsunami/makd for building D code. But it doesn't do dependency management like dub, as it expected libraries to be in `submodules/`.
Nov 08 2022