From 71a869284e066c8e8afdf1731fdc1bc3a71d604b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 15 Jul 2014 21:05:09 +0100 Subject: [PATCH] Add rust-url as a submodule and a Makefile for it. --- .gitmodules | 3 +++ configure | 6 +++++- mk/sub.mk | 4 ++++ src/support/url/Makefile.in | 25 +++++++++++++++++++++++++ src/support/url/configure | 4 ++++ src/support/url/rust-url | 1 + 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/support/url/Makefile.in create mode 100644 src/support/url/configure create mode 160000 src/support/url/rust-url diff --git a/.gitmodules b/.gitmodules index 7895365bc7d..1e398dd06c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -124,3 +124,6 @@ [submodule "src/support/stringcache/string-cache"] path = src/support/stringcache/string-cache url = https://github.com/mozilla-servo/string-cache.git +[submodule "src/support/url/rust-url"] + path = src/support/url/rust-url + url = https://github.com/mozilla-servo/rust-url.git diff --git a/configure b/configure index 8d2abe5e1ef..7005b64e480 100755 --- a/configure +++ b/configure @@ -528,7 +528,8 @@ CFG_SUBMODULES="\ support/opengles/rust-opengles \ support/sharegl/sharegl \ support/phf/rust-phf \ - support/stringcache/string-cache" + support/stringcache/string-cache \ + support/url/rust-url" if [ $CFG_OSTYPE = "apple-darwin" ] then @@ -748,6 +749,9 @@ do support/phf/rust-phf) ENABLE_DEBUG="" ;; + support/url/rust-url) + CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/support/url/configure" + ;; *) ;; esac diff --git a/mk/sub.mk b/mk/sub.mk index 1bcbdfab566..ca3ceafdd6a 100644 --- a/mk/sub.mk +++ b/mk/sub.mk @@ -91,6 +91,10 @@ DEPS_rust-png += \ libpng \ $(NULL) +DEPS_rust-url += \ + rust-encoding \ + $(NULL) + # Platform-specific dependencies ifeq ($(CFG_OSTYPE),apple-darwin) DEPS_rust-azure += \ diff --git a/src/support/url/Makefile.in b/src/support/url/Makefile.in new file mode 100644 index 00000000000..3ae64d01abb --- /dev/null +++ b/src/support/url/Makefile.in @@ -0,0 +1,25 @@ +VPATH=%VPATH% + +RUSTC ?= rustc +RUSTFLAGS ?= +EXT_DEPS ?= + +SRC=$(shell find $(VPATH)/src -type f) + +.PHONY: all +all: liburl.dummy + +liburl.dummy: src/url.rs $(SRC) $(EXT_DEPS) + $(RUSTC) $(RUSTFLAGS) $< --out-dir . + touch $@ + +url-test: src/url.rs $(SRC) + $(RUSTC) $(RUSTFLAGS) $< -o $@ --test + +.PHONY: check +check: url-test + ./url-test $(TEST) + +.PHONY: clean +clean: + rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test diff --git a/src/support/url/configure b/src/support/url/configure new file mode 100644 index 00000000000..4e86aec066d --- /dev/null +++ b/src/support/url/configure @@ -0,0 +1,4 @@ +#!/bin/bash + +SRCDIR="$(cd $(dirname $0) && pwd)" +sed "s#%VPATH%#${SRCDIR}/rust-url#" ${SRCDIR}/Makefile.in > Makefile diff --git a/src/support/url/rust-url b/src/support/url/rust-url new file mode 160000 index 00000000000..19c1aa0e73c --- /dev/null +++ b/src/support/url/rust-url @@ -0,0 +1 @@ +Subproject commit 19c1aa0e73c3252761ca3d722cba9cc0ae1ba1ca