Correctly preserve plugin deps

When copying files over from the old root to the new root on a fresh
compilation, care must be taken to preserve the correct plugin/host version of
each dependency. The previous code copied back over at most one library, but
this commit fixes this behavior by copying over all targets necessary for
compilation.
Don't blow away target/doc

The existing rustdoc behavior for working with an already-present directory is
good enough, so there's no need for cargo to help out by blowing things away.
This also makes the copy-back portion easier by just not having it.

Closes #284
Update README with new build instructions

- Remove outdated `git submodule` instructions
- Add new `./configure` build step
auto merge of #283 : alexcrichton/cargo/fix-fresh-plugin-deps, r=wycats

When copying files over from the old root to the new root on a fresh
compilation, care must be taken to preserve the correct plugin/host version of
each dependency. The previous code copied back over at most one library, but
this commit fixes this behavior by copying over all targets necessary for
compilation.
Improve the error message for missing packages.
Remove duplicated ${DESTDIR}.

Both Makefile.in and install.sh prepended ${DESTDIR} to ${PREFIX} so the
installation prefix became ${DESTDIR}/${DESTDIR}/${PREFIX}.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
auto merge of #286 : benizi/cargo/fix/update-build-in-readme, r=alexcrichton

- Remove outdated `git submodule` instructions
- Add new `./configure` build step
auto merge of #255 : michaelsproul/cargo/missing-pkg-error, r=alexcrichton

I've changed the error message that appears when a dependency can't be located. With my changes, mismatches between Cargo.toml dependency names and actual dependency package names are (slightly) more apparent. This doesn't change the error that appears when a dependency has an invalid source.

Example:

```toml
# Cargo.toml
...
[dependencies.foo]

path = "foo"
```

```toml
# foo/Cargo.toml
[package]

name = "not_foo"
```

Previously:

```
$ cargo build
No package named Dependency { name: foo, namespace: file:/home/michael/cargo_test, req: *, transitive: true } found
```

Now:

```
$ cargo build
No package named `foo` found (required by `bar`).
Location searched: /some/folder/not_foo
Version required: *
```

In verbose mode I think it would be also nice to print a list of packages that Cargo *does* know about. Something like: "Known packages amongst dependencies: not_foo, etc"
auto merge of #285 : alexcrichton/cargo/fix-cargo-doc, r=wycats

The existing rustdoc behavior for working with an already-present directory is
good enough, so there's no need for cargo to help out by blowing things away.
This also makes the copy-back portion easier by just not having it.

Closes #284
auto merge of #290 : omasanori/cargo/makefile, r=alexcrichton

Both Makefile.in and install.sh prepended `${DESTDIR}` to `${PREFIX}` so the installation prefix became `${DESTDIR}/${DESTDIR}/${PREFIX}`. Also, the script assumes that `${DESTDIR}` ends with a slash or `${PREFIX}` starts with it so I appended a slash to `${DESTDIR}`.
Make the dependency queue entirely generic

This paves the way for future intra-package parallelism as opposed to just
inter-package parallelism.
Power the TaskPool with a sync channel

This rate limits the jobs entering the pool to ensure that the number of
pending jobs is actually close to the number of cores. The current behavior is
to print all pending jobs, even when they're not executing, which may be
confusing.
Prepare for per-target fingerprints

This commit refactors all related infrastructure for the cargo_rustc module to
move the granularity of fingerprints from packages to targets. This involved
heavily modifying the `JobQueue` structure to understand a finer-grained target
for dirtiness propagation and dependency management, and then dealing with
fallout in the main module.

The fingerprint module has been refactored to support a per-target fingerprint.
A fallout of this change is that each build step has its own fingerprint,
including the custom build command step. This will be implemented in a future
commit.

As fallout of this reorganization, we are now exploiting the maximal parallelism
within packages themselves whereas before we were only partially parallelizing.
No new features were added as part of this commit, so I just ensured that all
the tests ran.
Implement per-target fingerprints

This commit refines the granularity of fingerprints from packages to targets,
building on the existing infrastructure. All invocations of rustc now include
the --dep-info flag which will emit makefile-like dependency information. This
information is then parsed later on to determine if all the files are fresh.

The purpose of this commit is to refine the set of files which indicate that a
target needs to be re-built. Before this commit if you modified a test it would
rebuild the entire library, but after this commit it only rebuilds the relevant
test.

Closes #214
Closes #289