Add rust-url as a submodule and a Makefile for it.

This commit is contained in:
Simon Sapin 2014-07-15 21:05:09 +01:00
parent f07d999463
commit 71a869284e
6 changed files with 42 additions and 1 deletions

3
.gitmodules vendored
View file

@ -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

6
configure vendored
View file

@ -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

View file

@ -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 += \

View file

@ -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

4
src/support/url/configure vendored Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
SRCDIR="$(cd $(dirname $0) && pwd)"
sed "s#%VPATH%#${SRCDIR}/rust-url#" ${SRCDIR}/Makefile.in > Makefile

@ -0,0 +1 @@
Subproject commit 19c1aa0e73c3252761ca3d722cba9cc0ae1ba1ca