Deny all warnings when building cargo

This helps keep the build a little cleaner and any breakage that happens due to
rust changing will likely be mitigated by nightlies.
auto merge of #281 : alexcrichton/cargo/no-more-warnings, r=wycats

This helps keep the build a little cleaner and any breakage that happens due to
rust changing will likely be mitigated by nightlies.
Fix some dep errors with cross-compiled plugins

* Make sure plugins link to plugin dependencies, not target dependencies.
  Previously the --extern flag was being passed incorrectly but the dependency
  was being picked up by -L anyway.

* Fix a type and actually put the host dep directory into LD_LIBRARY_PATH, not
  the target directory. A test was added for this change.
auto merge of #282 : alexcrichton/cargo/fix-some-cross-compile-with-plugins, r=wycats

* Make sure plugins link to plugin dependencies, not target dependencies.
  Previously the --extern flag was being passed incorrectly but the dependency
  was being picked up by -L anyway.

* Fix a type and actually put the host dep directory into LD_LIBRARY_PATH, not
  the target directory. A test was added for this change.
Add a configure script

This configure script is similar to rust's in that it doesn't require anything
like autotools, it's just a meta-script to "generate" a makefile and perform
run-of-the-mill validation/discovery before the Makefile is run.

The main purpose of this rewrite is to support multi-target and targeted builds.
This will allow us to produce 32-bit snapshots for platforms as well as easily
providing `./configure --target $foo` for initialization.

cc #274
auto merge of #277 : alexcrichton/cargo/add-configure-script, r=wycats

This configure script is similar to rust's in that it doesn't require anything
like autotools, it's just a meta-script to "generate" a makefile and perform
run-of-the-mill validation/discovery before the Makefile is run.

The main purpose of this rewrite is to support multi-target and targeted builds.
This will allow us to produce 32-bit snapshots for platforms as well as easily
providing `./configure --target $foo` for initialization.

cc #274
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}`.
Register new snapshots
Migrate from liburl to rust-url

The standard url library is soon-to-be deprecated, and now that we're
bootstrapping it's trivial to move over to rust-url.

Closes #204
Update the README with current information

Closes #271
Closes #274
Closes #292
auto merge of #295 : alexcrichton/cargo/snapshots, r=alexcrichton,me