about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-04-17 18:58:41 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-04-17 18:58:41 -0700
commita2761ac7b528eeeba375e0b0be0140fc1e5c50b3 (patch)
tree565e784fb0b53c2177cfc44adade23fe62be8b84
parent35f3b6324f1dc1f68539346d6bcda69a555910da (diff)
downloadrust-a2761ac7b528eeeba375e0b0be0140fc1e5c50b3.tar.gz
rust-a2761ac7b528eeeba375e0b0be0140fc1e5c50b3.zip
rustpkg: Change this example to show how to do a custom build
-rw-r--r--src/librustpkg/testsuite/pass/fancy-lib/pkg.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustpkg/testsuite/pass/fancy-lib/pkg.rs b/src/librustpkg/testsuite/pass/fancy-lib/pkg.rs
index 6d3495f2b28..be3c68d731b 100644
--- a/src/librustpkg/testsuite/pass/fancy-lib/pkg.rs
+++ b/src/librustpkg/testsuite/pass/fancy-lib/pkg.rs
@@ -8,10 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::run;
+
 pub fn main() {
     let cwd = os::getcwd();
     debug!("cwd = %s", cwd.to_str());
     let file = io::file_writer(&Path(~"fancy-lib/build/generated.rs"),
                                [io::Create]).get();
     file.write_str("pub fn wheeeee() { for [1, 2, 3].each() |_| { assert!(true); } }");
+
+    // now compile the crate itself
+    run::run_program("rustc", ~[~"fancy-lib/fancy-lib.rs", ~"--lib",
+                                ~"-o", ~"fancy-lib/build/fancy_lib"]);
 }
\ No newline at end of file