-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Describe the problem you are trying to solve
The generated target/*/app.d
file is incomplete in my opinion. Similar to the -MP
option for gcc
, I believe that we should be including phony targets for each dependency, so that if a dependency is deleted from src/
, then the Makefile will not fail on a missing file, but instead consider it out of date and runs the phony rule which does nothing, but then allows the makefile rule to re-run cargo.
Also, I believe that Cargo.toml
and Cargo.lock
should always be included as dependencies, since a change in either could mean that a rebuild is necessary.
Describe the solution you'd like
For a cargo project that looks like:
src/main.rs
src/lib.rs
where src/main.rs
uses src/lib.rs
, I propose the following .d
file be output:
foo: Cargo.lock Cargo.toml src/main.rs src/lib.rs
Cargo.lock:
Cargo.toml:
src/main.rs:
src/lib.rs:
Note: I found where this change would need to be made and it should be very simple. If interested, I can create a PR to solve this.