From 33950e869fe97646511d71ae59e437def20b9312 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Mon, 4 Aug 2014 16:37:00 -0600 Subject: [PATCH] Cargoify. --- .gitignore | 2 ++ Cargo.toml | 10 ++++++++++ Makefile.in | 8 ++++---- lib.rs => src/lib.rs | 0 xlib.rs => src/xlib.rs | 0 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 Cargo.toml rename lib.rs => src/lib.rs (100%) rename xlib.rs => src/xlib.rs (100%) diff --git a/.gitignore b/.gitignore index 27c3218..f152462 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *~ /doc +/target + diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7285f47 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] + +name = "xlib" +version = "0.1.0" +authors = ["The Servo Project Developers"] + +[[lib]] + +name = "xlib" +crate-type = ["rlib"] diff --git a/Makefile.in b/Makefile.in index 6e1c393..486501d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,16 +6,16 @@ RUSTDOC ?= rustdoc RUSTDOC_FLAGS ?= RUSTDOC_TARGET ?= doc -RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') +RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs') .PHONY: all all: libxlib.dummy -libxlib.dummy: lib.rs $(RUST_SRC) +libxlib.dummy: src/lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< --crate-type=lib --out-dir . touch $@ -xlib-test: lib.rs $(RUST_SRC) +xlib-test: src/lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test .PHONY: check @@ -25,7 +25,7 @@ check: xlib-test .PHONY: doc doc: $(RUSTDOC_TARGET)/xlib/index.html -$(RUSTDOC_TARGET)/xlib/index.html: lib.rs $(RUST_SRC) +$(RUSTDOC_TARGET)/xlib/index.html: src/lib.rs $(RUST_SRC) $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) .PHONY: clean diff --git a/lib.rs b/src/lib.rs similarity index 100% rename from lib.rs rename to src/lib.rs diff --git a/xlib.rs b/src/xlib.rs similarity index 100% rename from xlib.rs rename to src/xlib.rs