rust/src/librustpkg
Tim Chevalier c120464be0 rustc/rusti/rustpkg: Infer packages from extern mod directives
This commit won't be quite as useful until I implement RUST_PATH and
until we change `extern mod` to take a general string instead of
an identifier (#5682 and #6407).

With that said, now if you're using rustpkg and a program contains:

extern mod foo;

rustpkg will attempt to search for `foo`, so that you don't have to
provide a -L directory explicitly. In addition, rustpkg will
actually try to build and install `foo`, unless it's already
installed (specifically, I tested that `extern mod extra;` would
not cause it to try to find source for `extra` and compile it
again).

This is as per #5681.

Incidentally, I changed some driver code to infer the link name
from the crate link_meta attributes. If that change isn't ok, say
something. Also, I changed the addl_lib_search_paths field in the
session options to be an @mut ~[Path] so that it can be modified
after expansion but before later phases.
2013-06-01 18:48:07 -07:00
..
testsuite rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
conditions.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
context.rs libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
package_id.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
package_path.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
path_util.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
README.txt rustpkg: update README saying which tests pass 2013-04-24 17:51:30 -07:00
rustpkg.rc rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
search.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
target.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
tests.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
usage.rs Remove unnecessary allocations flagged by lint from rustpkg 2013-05-21 23:00:34 +09:00
util.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00
workspace.rs rustc/rusti/rustpkg: Infer packages from extern mod directives 2013-06-01 18:48:07 -07:00

Right now, commands that work are "build" and "clean".

`rustpkg build` and `rustpkg clean` should work

for example:
$ cd ~/rust/src/librustpkg/testsuite/pass
$ rustpkg build hello-world
... some output ...
$ rustpkg clean hello-world

-------------
the following test packages in librustpkg/testsuite/pass:
      * hello-world
      * install-paths
      * simple-lib
      * deeply/nested/path
      * fancy-lib

   It fails on the following test packages:
      * external-crate (no support for `extern mod` inference yet)

and should fail with proper error messages
on all of the test packages in librustpkg/testsuite/fail
      * no-inferred-crates