[OT] D in makefiles

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 18 12:24:21 PST 2016


On 12/18/16 2:47 PM, Shachar Shemesh wrote:
> On 17/12/16 10:06, John Colvin wrote:
>> 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.
>
> Since newlines in make mean new execution, you will find it pretty hard
> to write a recipe that will be both usable and readable.

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. -- Andrei


More information about the Digitalmars-d mailing list