Permalink
Browse files

Support out of tree builds

  • Loading branch information...
1 parent 45b43e5 commit b98eee0e461b0a559083f93866a99398af40f9e6 @brson brson committed May 5, 2012
Showing with 30 additions and 18 deletions.
  1. +1 −0 .gitignore
  2. +17 −14 Makefile.in
  3. +9 −1 configure
  4. +1 −1 src/rust-azure
  5. +1 −1 src/rust-cocoa
  6. +1 −1 src/rust-sdl
View
@@ -9,3 +9,4 @@
servo-test
Makefile
Servo.app
+build
View
@@ -12,8 +12,11 @@ ifeq ($(UNAME),Linux)
OSTYPE=linux
endif
-RUSTFLAGS += -L $(VPATH)/src/rust-azure -L $(VPATH)/src/rust-sdl \
- -L $(VPATH)/src/rust-cocoa
+RUSTFLAGS += \
+ -L src/rust-azure \
+ -L src/rust-sdl \
+ -L src/rust-cocoa \
+ $(NULL)
RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs')
@@ -59,13 +62,13 @@ servo-test: $(SERVO_DEPS)
$(RUSTC) $(RUSTFLAGS) --test -o $@ $<
src/rust-azure/libazure.dummy:
- make -C $(VPATH)/src/rust-azure
+ make -C src/rust-azure
src/rust-sdl/libsdl.dummy:
- make -C $(VPATH)/src/rust-sdl
+ make -C src/rust-sdl
src/rust-cocoa/libcocoa.dummy:
- make -C $(VPATH)/src/rust-cocoa
+ make -C src/rust-cocoa
check: $(CHECK_DEPS)
@@ -74,30 +77,30 @@ check-servo: servo-test
.PHONY: check-azure
check-azure:
- make check -C $(VPATH)/src/rust-azure
+ make check -C src/rust-azure
.PHONY: check-sdl
check-sdl:
- make check -C $(VPATH)/src/rust-sdl
+ make check -C src/rust-sdl
.PHONY: check-cocoa
check-cocoa:
- make check -C $(VPATH)/src/rust-cocoa
+ make check -C src/rust-cocoa
.PHONY: clean
clean: $(CLEAN_DEPS)
.PHONY: clean-azure
clean-azure:
- make clean -C $(VPATH)/src/rust-azure
+ make clean -C src/rust-azure
.PHONY: clean-sdl
clean-sdl:
- make clean -C $(VPATH)/src/rust-sdl
+ make clean -C src/rust-sdl
.PHONY: clean-cocoa
clean-cocoa:
- make clean -C $(VPATH)/src/rust-cocoa
+ make clean -C src/rust-cocoa
.PHONY: clean-servo
clean-servo:
@@ -111,9 +114,9 @@ package: servo
mkdir -p Servo.app/Contents/MacOS/src/rust-azure
cp $(VPATH)/Info.plist Servo.app/Contents/
cp servo Servo.app/Contents/MacOS/
- cp $(VPATH)/src/rust-cocoa/lib*.dylib Servo.app/Contents/MacOS/src/rust-cocoa/
- cp $(VPATH)/src/rust-sdl/lib*.dylib Servo.app/Contents/MacOS/src/rust-sdl/
- cp $(VPATH)/src/rust-azure/lib*.dylib Servo.app/Contents/MacOS/src/rust-azure/
+ cp src/rust-cocoa/lib*.dylib Servo.app/Contents/MacOS/src/rust-cocoa/
+ cp src/rust-sdl/lib*.dylib Servo.app/Contents/MacOS/src/rust-sdl/
+ cp src/rust-azure/lib*.dylib Servo.app/Contents/MacOS/src/rust-azure/
else
View
@@ -1,4 +1,12 @@
#!/bin/bash
-sed "s/%VPATH%/`dirname $0`/" `dirname $0`/Makefile.in > Makefile
+SRCDIR="$(cd $(dirname $0) && pwd)"
+sed "s#%VPATH%#${SRCDIR}#" ${SRCDIR}/Makefile.in > Makefile
+mkdir -p src/rust-sdl
+mkdir -p src/rust-azure
+mkdir -p src/rust-cocoa
+
+(cd src/rust-sdl && sh ${SRCDIR}/src/rust-sdl/configure)
+(cd src/rust-azure && sh ${SRCDIR}/src/rust-azure/configure)
+(cd src/rust-cocoa && sh ${SRCDIR}/src/rust-cocoa/configure)
Submodule rust-azure updated 3 files
+1 −0 .gitignore
+17 −25 Makefile.in
+4 −0 configure
Submodule rust-cocoa updated 4 files
+1 −0 .gitignore
+3 −1 Makefile.in
+1 −1 cocoa.rs
+4 −0 configure
Submodule rust-sdl updated 3 files
+1 −0 .gitignore
+3 −1 Makefile.in
+4 −0 configure

0 comments on commit b98eee0

Please sign in to comment.