From 98fc243d6bf36629ee7f16a249fe46505799e88d Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Mon, 25 Aug 2014 21:02:14 -0600 Subject: [PATCH] Cargoify rust-alert --- .gitignore | 2 ++ Cargo.toml | 19 +++++++++++++++++++ Makefile.in | 8 ++++---- android.rs => src/android.rs | 0 alert.rc => src/lib.rs | 0 linux.rs => src/linux.rs | 0 macos.rs => src/macos.rs | 0 test.rs => src/test.rs | 0 8 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 Cargo.toml rename android.rs => src/android.rs (100%) rename alert.rc => src/lib.rs (100%) rename linux.rs => src/linux.rs (100%) rename macos.rs => src/macos.rs (100%) rename test.rs => src/test.rs (100%) diff --git a/.gitignore b/.gitignore index 5df5866..09ab198 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /doc +/target +/Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..888cd0a --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,19 @@ +[package] + +name = "alert" +version = "0.1.0" +authors = ["The Servo Project Developers"] + +[lib] + +name = "alert" +crate-type = ["rlib"] + +[dependencies.cocoa] + +git = "https://github.com/servo/rust-cocoa" + +[dependencies.core_foundation] + +git = "https://github.com/servo/rust-core-foundation" + diff --git a/Makefile.in b/Makefile.in index d3933c6..c60685a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,7 @@ 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: librustalert.dummy @@ -19,11 +19,11 @@ all: librustalert.dummy %.o: %.c $(CC) $< -o $@ -c $(CFLAGS) -librustalert.dummy: alert.rc $(RUST_SRC) $(EXT_DEPS) +librustalert.dummy: src/lib.rs $(RUST_SRC) $(EXT_DEPS) $(RUSTC) $(RUSTFLAGS) $< --out-dir . touch $@ -alert-test: alert.rc $(RUST_SRC) $(EXT_DEPS) +alert-test: src/lib.rs $(RUST_SRC) $(EXT_DEPS) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test check: alert-test @@ -32,7 +32,7 @@ check: alert-test .PHONY: doc doc: $(RUSTDOC_TARGET)/alert/index.html -$(RUSTDOC_TARGET)/alert/index.html: alert.rc $(RUST_SRC) $(EXT_DEPS) +$(RUSTDOC_TARGET)/alert/index.html: src/lib.rs $(RUST_SRC) $(EXT_DEPS) $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) .PHONY: clean diff --git a/android.rs b/src/android.rs similarity index 100% rename from android.rs rename to src/android.rs diff --git a/alert.rc b/src/lib.rs similarity index 100% rename from alert.rc rename to src/lib.rs diff --git a/linux.rs b/src/linux.rs similarity index 100% rename from linux.rs rename to src/linux.rs diff --git a/macos.rs b/src/macos.rs similarity index 100% rename from macos.rs rename to src/macos.rs diff --git a/test.rs b/src/test.rs similarity index 100% rename from test.rs rename to src/test.rs