[rust-dev] How to build multiple .rs source files?

Niko Matsakis niko at alum.mit.edu
Tue Apr 10 09:56:20 PDT 2012


On 4/10/12 7:56 AM, Amitava Shee wrote:
> For those still in baby step phase, I have the most rudimentary 
> project in github -
> https://github.com/ashee/rust-babysteps

This look about right, except of course that the dependencies in the 
Makefile are incomplete  You probably want "myapp: myapp.rc $(wildcard 
*.rs)" or something like that.  Otherwise changing, for example, amod.rs 
will not trigger a recompilation.  Or you could just declare "myapp" as 
`.PHONY` (my personal preference, since I am lazy and I'd rather 
recompile than miss a dependency).


Niko


More information about the Rust-dev mailing list