On 2012-02-09 14:47, Pedro Lacerda wrote:
Hi all,

My directory tree:

proj/
├── Makefile
├── bin/
├── C/
│   └── ev.h
├── deimos/
│   └── ev.d
└── proj/
     └── main.d

In my makefile I want:

  * compile deimos/ev.d
  * compile proj/main.d
  * link all together in bin/

Do you have some sugestion?


Use a shell script together with RDMD. Something like:

#!/bin/sh

rdmd --build-only -ofbin/main -deimos "$@" proj/main.d

RDMD will track all dependencies and automatically build them. If you drop the --build-only flag RDMD will run the resulting binary as well. You can pass in additional flags to the compiler as well through the shell script.

--
/Jacob Carlborg

Reply via email to