Install multiple executables with DUB

glis-glis andreas.fueglistaler at gmail.com
Thu Sep 17 09:13:14 UTC 2020


On Tuesday, 8 September 2020 at 08:41:24 UTC, glis-glis wrote:
>
> Following the advice of drug, I moved the "tools" folder from 
> src to the parent directory, added a dependency to "biophysics" 
> with path ".." and build the binaries with  "dub build --single 
> tools/..."
>
> This works fine, however, now I have a problem when editing 
> with Emacs: Flycheck gives errors as it cannot find my package 
> anymore and company autocomplete does not work anymore neither.
> By the way, I have the same problem when I clone tsv-utils and 
> open the source file with Emacs. I have to admit I am using 
> emacs' d-mode as a black-box since there seems to be no 
> documentation, and I am not very fluent in elisp...


To follow up, I came up with the following folder structure:

.
├── bin
│   └── ...
├── dub.sdl
├── install
├── lib
│   └── ...
├── src
│   └── biophysics
│       └── ...
├── test
│   └── ...
└── tools
     ├── biophysics -> ../src/biophysics
     └── ...

the symbolic link did the trick for emacs Flycheck and Company. 
The install script simply reads

#!/usr/bin/env bash
for f in tools/*.d; do
	dub build --build=release --single $f
done


More information about the Digitalmars-d-learn mailing list