servo: Work on integrating rust-cocoa
authorBrian Anderson <banderson@mozilla.com>
Wed, 18 Apr 2012 15:25:30 -0700
changeset 381455 c09be43da0e5e5b1d45eb3304584d1f6985b15a7
parent 381454 4374bb29f9e868ca9c215571521dce044f7a7849
child 381456 4dc5e560536d24f9843eb99e4e3df9cff54b169b
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
servo: Work on integrating rust-cocoa Source-Repo: https://github.com/servo/servo Source-Revision: f403129da42ddd6319cb27f2abbd87de8e6b9ec6
servo/.gitignore
servo/Makefile.in
--- a/servo/.gitignore
+++ b/servo/.gitignore
@@ -1,3 +1,10 @@
 *~
+*#
+*.o
+*.so
+*.dylib
+*.dSYM
+*.dll
+*.dummy
+servo-test
 Makefile
-servo-test
\ No newline at end of file
--- a/servo/Makefile.in
+++ b/servo/Makefile.in
@@ -1,39 +1,89 @@
 VPATH=%VPATH%
 
 RUSTC?=rustc
 RUSTFLAGS?=
 
-RUSTFLAGS += -L src/rust-azure -L src/rust-sdl
+UNAME=$(shell uname)
+
+ifeq ($(UNAME),Darwin)
+    OSTYPE=darwin
+endif
+ifeq ($(UNAME),Linux)
+    OSTYPE=linux
+endif
+
+RUSTFLAGS += -L src/rust-azure -L src/rust-sdl -L src/rust-cocoa
 
 RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs')
 
+SERVO_DEPS = \
+	src/servo/servo.rc \
+	$(RUST_SRC) \
+	$(NULL)
+CHECK_DEPS =
+
+ifeq ($(OSTYPE),darwin)
+    SERVO_DEPS += src/rust-cocoa/libcocoa.dummy
+    # I want the cocoa check to come before the servo check since if cocoa
+    # doesn't work neither does servo
+    CHECK_DEPS += check-cocoa
+endif
+
+SERVO_DEPS += \
+	src/rust-azure/libazure.dummy \
+	src/rust-sdl/libsdl.dummy \
+	$(NULL)
+
+CHECK_DEPS += \
+	check-sdl \
+	check-azure \
+	check-servo \
+	$(NULL)
+
 .PHONY:	all
 all:    servo
 
-servo:	\
-	src/servo/servo.rc $(RUST_SRC) \
-	src/rust-azure/libazure.dummy \
-	src/rust-sdl/libsdl.dummy
+servo:	$(SERVO_DEPS)
 	$(RUSTC) $(RUSTFLAGS) -o $@ $<
 
-servo-test: \
-	src/servo/servo.rc $(RUST_SRC) \
-	src/rust-azure/libazure.dummy \
-	src/rust-sdl/libsdl.dummy
+servo-test: $(SERVO_DEPS)
 	$(RUSTC) $(RUSTFLAGS) --test -o $@ $<
 
+check: $(CHECK_DEPS)
+
+check-servo: servo-test
+	./servo-test
+
+check-azure: src/rust-azure/azure-test
+	src/rust-azure/azure-test
+
+check-sdl: src/rust-sdl/sdl-test
+	src/rust-sdl/sdl-test
+
+check-cocoa: src/rust-cocoa/cocoa-test
+	src/rust-cocoa/cocoa-test
+
 src/rust-azure/libazure.dummy:
 	make -C src/rust-azure
 
 src/rust-sdl/libsdl.dummy:
 	make -C src/rust-sdl
 
+src/rust-cocoa/libcocoa.dummy:
+	make -C src/rust-cocoa
+
+src/rust-azure/azure-test:
+	make check -C src/rust-azure
+
+src/rust-sdl/sdl-test:
+	make check -C src/rust-sdl
+
+src/rust-cocoa/cocoa-test:
+	make check -C src/rust-cocoa
+
 .PHONY:	clean
 clean:
 	make clean -C src/rust-azure
 	make clean -C src/rust-sdl
+	make clean -C src/rust-cocoa
 	rm -f servo servo-test
-
-.PHONY: test
-test:	servo-test
-	./servo-test