digitalmars.D - [OT] D in makefiles
- Superstar64 (3/3) Dec 16 2016 Makefiles allow custom shells. So with a small wrapper script we
- John Colvin (4/7) Dec 17 2016 If you define
- Shachar Shemesh (6/13) Dec 18 2016 Since newlines in make mean new execution, you will find it pretty hard
- Andrei Alexandrescu (5/16) Dec 18 2016 IIRC there is an option in gmake that allows one to run all commands
- Shachar Shemesh (5/8) Dec 19 2016 Was not aware of this. Thanks!
Makefiles allow custom shells. So with a small wrapper script we can use D in makefile. Here's my proof of concept: https://gist.github.com/Superstar64/8b896312ebe1a6e6240b1cba8aed2488.
Dec 16 2016
On Saturday, 17 December 2016 at 02:00:34 UTC, Superstar64 wrote:Makefiles allow custom shells. So with a small wrapper script we can use D in makefile. Here's my proof of concept: https://gist.github.com/Superstar64/8b896312ebe1a6e6240b1cba8aed2488.If you define SHELL = rdmd you might not need any wrapper script.
Dec 17 2016
On 17/12/16 10:06, John Colvin wrote:On Saturday, 17 December 2016 at 02:00:34 UTC, Superstar64 wrote:Since newlines in make mean new execution, you will find it pretty hard to write a recipe that will be both usable and readable. This is, of course, assuming you overcome the fact that rdmd does not accept the program as a "-c" argument. ShacharMakefiles allow custom shells. So with a small wrapper script we can use D in makefile. Here's my proof of concept: https://gist.github.com/Superstar64/8b896312ebe1a6e6240b1cba8aed2488.If you define SHELL = rdmd you might not need any wrapper script.
Dec 18 2016
On 12/18/16 2:47 PM, Shachar Shemesh wrote:On 17/12/16 10:06, John Colvin wrote:IIRC there is an option in gmake that allows one to run all commands within the same shell. https://www.gnu.org/software/make/manual/html_node/One-Shell.html. Anyway, it seems such usage of rdmd would be quite extreme. -- AndreiOn Saturday, 17 December 2016 at 02:00:34 UTC, Superstar64 wrote:Since newlines in make mean new execution, you will find it pretty hard to write a recipe that will be both usable and readable.Makefiles allow custom shells. So with a small wrapper script we can use D in makefile. Here's my proof of concept: https://gist.github.com/Superstar64/8b896312ebe1a6e6240b1cba8aed2488.If you define SHELL = rdmd you might not need any wrapper script.
Dec 18 2016
On 18/12/16 22:24, Andrei Alexandrescu wrote:IIRC there is an option in gmake that allows one to run all commands within the same shell. https://www.gnu.org/software/make/manual/html_node/One-Shell.html.Was not aware of this. Thanks! Too bad it's an all or nothing thing. It would, otherwise, have been very useful to me in various make files I've written in the past. Shachar
Dec 19 2016