Build with make instead of rustpkg.

This commit is contained in:
Jack Moffitt 2013-12-26 20:43:05 -07:00
parent cb336a1831
commit 0c62b99559
21 changed files with 52 additions and 117 deletions

View file

@ -116,15 +116,11 @@ rust: $(CFG_RUSTC)
# Strip off submodule paths to determine "raw" submodule names.
SUBMODULES=$(shell echo $(CFG_SUBMODULES) | perl -p -e 's![A-Za-z0-9_-]+/!!g')
SUBMODULES_RUSTPKG=$(shell echo $(CFG_SUBMODULES_RUSTPKG) | perl -p -e 's![A-Za-z0-9_-]+/!!g')
# Define e.g. PATH_skia = support/skia/skia
$(foreach submodule,$(CFG_SUBMODULES),\
$(eval PATH_$(shell echo $(submodule) | perl -p -e 's![A-Za-z0-9_-]+/!!g') = $(submodule)))
$(foreach submodule,$(CFG_SUBMODULES_RUSTPKG),\
$(eval PATH_$(shell echo $(submodule) | perl -p -e 's![A-Za-z0-9_-]+/!!g') = $(submodule)))
define DEF_SUBMODULE_VARS
#defaults
@ -146,17 +142,12 @@ DEPS_SUBMODULES += $$(PATH_$(1))/.libs
DEPS_SUBMODULES += $$(PATH_$(1))/src/.libs
endef
DEPS_RUSTPKG = $(CFG_BUILD_HOME)workspace/lib/$(CFG_TARGET_TRIPLES)
# these will get populated.
DEPS_SUBMODULES =
$(foreach submodule,$(SUBMODULES),\
$(eval $(call DEF_SUBMODULE_VARS,$(submodule))))
$(foreach submodule,$(SUBMODULES_RUSTPKG),\
$(eval DONE_$(submodule) = $(DEPS_RUSTPKG)/lib$(submodule)*))
# Handle rust submodule vars specially
DONE_rust = $(CFG_RUSTC)
@ -210,53 +201,46 @@ endef
$(foreach submodule,$(SUBMODULES),\
$(eval $(call DEF_SUBMODULE_RULES,$(submodule))))
# include rustpkg rules
include $(S)mk/rustpkg.mk
$(foreach submodule,$(SUBMODULES_RUSTPKG),\
$(eval $(call DEF_SUBMODULE_RUSTPKG_RULES,$(submodule))))
DONE_SUBMODULES = $(foreach submodule,$(SUBMODULES),$(DONE_$(submodule)))
DONE_SUBMODULES_RUSTPKG = $(foreach submodule,$(SUBMODULES_RUSTPKG),$(DONE_$(submodule)))
RFLAGS_util = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(DEPS_RUSTPKG)
RFLAGS_util = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
SRC_util = $(call rwildcard,$(S)src/components/util/,*.rs)
CRATE_util = $(S)src/components/util/util.rc
DONE_util = $(B)src/components/util/libutil.dummy
DEPS_util = $(CRATE_util) $(SRC_util) $(DONE_SUBMODULES) $(DONE_SUBMODULES_RUSTPKG) | $(SUBMODULES_RUSTPKG)
DEPS_util = $(CRATE_util) $(SRC_util) $(DONE_SUBMODULES)
RFLAGS_net = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(DEPS_RUSTPKG)
RFLAGS_net = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
SRC_net = $(call rwildcard,$(S)src/components/net/,*.rs)
CRATE_net = $(S)src/components/net/net.rc
DONE_net = $(B)src/components/net/libnet.dummy
DEPS_net = $(CRATE_net) $(SRC_net) $(DONE_SUBMODULES) $(DONE_util) $(DONE_SUBMODULES_RUSTPKG) | $(SUBMODULES_RUSTPKG)
DEPS_net = $(CRATE_net) $(SRC_net) $(DONE_SUBMODULES) $(DONE_util)
RFLAGS_msg = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(DEPS_RUSTPKG)
RFLAGS_msg = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
SRC_msg = $(call rwildcard,$(S)src/components/msg/,*.rs)
CRATE_msg = $(S)src/components/msg/msg.rc
DONE_msg = $(B)src/components/msg/libmsg.dummy
DEPS_msg = $(CRATE_msg) $(SRC_msg) $(DONE_SUBMODULES) $(DONE_SUBMODULES_RUSTPKG) | $(SUBMODULES_RUSTPKG)
DEPS_msg = $(CRATE_msg) $(SRC_msg) $(DONE_SUBMODULES)
RFLAGS_gfx = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L $(DEPS_RUSTPKG)
RFLAGS_gfx = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg
SRC_gfx = $(call rwildcard,$(S)src/components/gfx/,*.rs)
CRATE_gfx = $(S)src/components/gfx/gfx.rc
DONE_gfx = $(B)src/components/gfx/libgfx.dummy
DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg) $(DONE_SUBMODULES_RUSTPKG) | $(SUBMODULES_RUSTPKG)
DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg)
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L $(DEPS_RUSTPKG)
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg
WEBIDL_script = $(call rwildcard,$(S)src/components/script/,*.webidl)
AUTOGEN_SRC_script = $(patsubst %.webidl, %Binding.rs, $(WEBIDL_script))
SRC_script = $(call rwildcard,$(S)src/components/script/,*.rs) $(AUTOGEN_SRC_script)
CRATE_script = $(S)src/components/script/script.rc
DONE_script = $(B)src/components/script/libscript.dummy
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg) $(DONE_SUBMODULES_RUSTPKG) | $(SUBMODULES_RUSTPKG)
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg)
RFLAGS_style = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(DEPS_RUSTPKG)
RFLAGS_style = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
MAKO_ZIP = $(S)src/components/style/Mako-0.8.1.zip
MAKO_style = $(S)src/components/style/properties.rs
MAKO_SRC_style = $(MAKO_style).mako
@ -264,14 +248,14 @@ SRC_style = $(call rwildcard,$(S)src/components/style/,*.rs) $(MAKO_style)
CRATE_style = $(S)src/components/style/style.rc
DONE_style = $(B)src/components/style/libstyle.dummy
DEPS_style = $(CRATE_style) $(SRC_style) $(DONE_SUBMODULES) $(DONE_util) | $(SUBMODULES_RUSTPKG)
DEPS_style = $(CRATE_style) $(SRC_style) $(DONE_SUBMODULES) $(DONE_util)
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg -L $(DEPS_RUSTPKG)
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg
SRC_servo = $(call rwildcard,$(S)src/components/main/,*.rs)
CRATE_servo = $(S)src/components/main/servo.rc
DEPS_servo = $(CRATE_servo) $(SRC_servo) $(DONE_SUBMODULES) $(DONE_util) $(DONE_gfx) $(DONE_script) $(DONE_net) $(DONE_msg) $(DONE_style) $(DONE_SUBMODULES_RUSTPKG) | $(SUBMODULES_RUSTPKG)
DEPS_servo = $(CRATE_servo) $(SRC_servo) $(DONE_SUBMODULES) $(DONE_util) $(DONE_gfx) $(DONE_script) $(DONE_net) $(DONE_msg) $(DONE_style)
SERVO_LIB_CRATES = util net msg gfx script style
@ -371,5 +355,3 @@ backup-rust:
restore-rust:
$(MAKE) -f $(S)Makefile.backup $@
.NOTPARALLEL:

25
configure vendored
View file

@ -402,7 +402,6 @@ probe CFG_CLANG clang++
CFG_BUILD_DIR="${CFG_BUILD_HOME}${CFG_TARGET_TRIPLES}/"
make_dir "${CFG_BUILD_DIR}"
make_dir "${CFG_BUILD_HOME}/workspace/src"
if [ ! -z "$CFG_LOCAL_RUST_ROOT" ]
then
@ -411,7 +410,6 @@ then
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc --version`
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
CFG_RUSTC=${CFG_LOCAL_RUST_ROOT}/bin/rustc
CFG_RUSTPKG=${CFG_LOCAL_RUST_ROOT}/bin/rustpkg
CFG_RUST_HOME=${CFG_LOCAL_RUST_ROOT}
CFG_LOCAL_RUSTC=1
else
@ -421,7 +419,6 @@ else
step_msg "using in-tree rust compiler"
# The Rust compiler we're going to build
CFG_RUSTC="${CFG_BUILD_DIR}src/compiler/rust/${DEFAULT_TARGET_TRIPLE}/stage2/bin/rustc"
CFG_RUSTPKG="${CFG_BUILD_DIR}src/compiler/rust/${DEFAULT_TARGET_TRIPLE}/stage2/bin/rustpkg"
CFG_RUST_HOME="${CFG_BUILD_DIR}src/compiler/rust/${DEFAULT_TARGET_TRIPLE}/stage2"
fi
@ -488,12 +485,6 @@ then
done
fi
CFG_SUBMODULES_RUSTPKG="\
support/geom/rust-geom \
support/layers/rust-layers \
support/opengles/rust-opengles \
support/sharegl/sharegl"
CFG_SUBMODULES="\
support/alert/rust-alert \
support/azure/rust-azure \
@ -511,17 +502,19 @@ CFG_SUBMODULES="\
support/spidermonkey/rust-mozjs \
support/stb-image/rust-stb-image \
support/png/libpng \
support/png/rust-png"
support/png/rust-png \
support/geom/rust-geom \
support/layers/rust-layers \
support/opengles/rust-opengles \
support/sharegl/sharegl"
if [ $CFG_OSTYPE = "apple-darwin" ]
then
CFG_SUBMODULES_RUSTPKG="\
CFG_SUBMODULES="\
platform/macos/rust-core-foundation \
platform/macos/rust-core-graphics \
platform/macos/rust-core-text \
platform/macos/rust-io-surface \
${CFG_SUBMODULES_RUSTPKG}"
CFG_SUBMODULES="\
support/glfw/glfw \
support/glfw/glfw-rs \
platform/macos/rust-cocoa \
@ -530,10 +523,8 @@ fi
if [ $CFG_OSTYPE = "unknown-linux-gnu" ]
then
CFG_SUBMODULES_RUSTPKG="\
platform/linux/rust-xlib \
${CFG_SUBMODULES_RUSTPKG}"
CFG_SUBMODULES="\
platform/linux/rust-xlib \
support/glfw/glfw \
support/glfw/glfw-rs \
platform/linux/rust-fontconfig \
@ -563,10 +554,8 @@ putvar CFG_BUILD_HOME
putvar CFG_BUILD_DIR
putvar CFG_CONFIGURE_ARGS
putvar CFG_SUBMODULES
putvar CFG_SUBMODULES_RUSTPKG
putvar CFG_DISABLE_MANAGE_SUBMODULES
putvar CFG_RUSTC
putvar CFG_RUSTPKG
putvar CFG_RUSTC_FLAGS
putvar CFG_RUST_HOME
putvar CFG_PATH

View file

@ -1,36 +0,0 @@
EMPTY=
SPACE=$(EMPTY) $(EMPTY)
define DEF_SUBMODULE_RUSTPKG_RULES
$(eval $(call DEF_SUBMODULE_DEPS,$(1)))
$(1) : $$(DONE_$(1))
.PHONY : $(1)
DO_CLEAN_$(1) = rm -rf $$(DONE_$(1)) $(CFG_BUILD_HOME)/workspace/build/$(CFG_TARGET_TRIPLES)/$(1)
EXTRA_RFLAGS_$(1) =
ifeq ($$(shell uname -s),Darwin)
ifeq ($$(shell sw_vers | grep -c 10.6),1)
EXTRA_RFLAGS_$(1) += --cfg mac_10_6
endif
ifeq ($$(shell sw_vers | grep -c 10.7),1)
EXTRA_RFLAGS_$(1) += --cfg mac_10_7
endif
else
endif
clean-$(1) :
$$(Q) $$(DO_CLEAN_$(1))
.PHONY : clean-$(1)
# Need to clean otherwise rustpkg won't rebuild.
$$(DONE_$(1)) : $$(DONE_rust) $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1))
$$(Q) $$(DO_CLEAN_$(1))
$$(Q) RUST_PATH=$(CFG_BUILD_HOME)workspace:$(subst $(SPACE),:,$(foreach submodule,$(strip $(CFG_SUBMODULES_RUSTPKG)),$(S)src/$(submodule))) \
$(CFG_RUSTPKG) --rust-path-hack install $(CFG_RUSTC_FLAGS) $$(EXTRA_RFLAGS_$(1)) $(1)
endef

View file

@ -12,8 +12,8 @@
extern mod azure;
extern mod extra;
extern mod geom = "rust-geom";
extern mod layers = "rust-layers";
extern mod geom;
extern mod layers;
extern mod stb_image;
extern mod png;
extern mod servo_net (name = "net");
@ -30,9 +30,9 @@ extern mod harfbuzz;
#[cfg(target_os="linux")] #[cfg(target_os="android")] extern mod freetype;
// Mac OS-specific library dependencies
#[cfg(target_os="macos")] extern mod core_foundation = "rust-core-foundation";
#[cfg(target_os="macos")] extern mod core_graphics = "rust-core-graphics";
#[cfg(target_os="macos")] extern mod core_text = "rust-core-text";
#[cfg(target_os="macos")] extern mod core_foundation;
#[cfg(target_os="macos")] extern mod core_graphics;
#[cfg(target_os="macos")] extern mod core_text;
pub use gfx_font = font;
pub use gfx_font_context = font_context;

View file

@ -4,9 +4,9 @@
/// Implementation of Quartz (CoreGraphics) fonts.
extern mod core_foundation = "rust-core-foundation";
extern mod core_graphics = "rust-core-graphics";
extern mod core_text = "rust-core-text";
extern mod core_foundation;
extern mod core_graphics;
extern mod core_text;
use font::{CSSFontWeight, FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FontWeight100, FontWeight200, FontWeight300, FontWeight400};

View file

@ -15,15 +15,15 @@
extern mod alert;
extern mod azure;
extern mod geom = "rust-geom";
extern mod geom;
extern mod gfx (name = "gfx");
#[cfg(not(target_os="android"))]
extern mod glfw;
#[cfg(target_os="android")]
extern mod glut;
extern mod js;
extern mod layers = "rust-layers";
extern mod opengles = "rust-opengles";
extern mod layers;
extern mod opengles;
extern mod png;
extern mod script;
extern mod servo_net (name = "net");
@ -35,9 +35,9 @@ extern mod stb_image;
extern mod extra;
#[cfg(target_os="macos")]
extern mod core_graphics = "rust-core-graphics";
extern mod core_graphics;
#[cfg(target_os="macos")]
extern mod core_text = "rust-core-text";
extern mod core_text;
use compositing::{CompositorChan, CompositorTask};
use constellation::Constellation;

View file

@ -10,14 +10,14 @@
extern mod azure;
extern mod extra;
extern mod geom = "rust-geom";
extern mod layers = "rust-layers";
extern mod geom;
extern mod layers;
extern mod std;
#[cfg(target_os="macos")]
extern mod core_foundation = "rust-core-foundation";
extern mod core_foundation;
#[cfg(target_os="macos")]
extern mod io_surface = "rust-io-surface";
extern mod io_surface;
pub mod compositor_msg;
pub mod constellation_msg;

View file

@ -10,7 +10,7 @@
#[feature(globs, managed_boxes)];
extern mod geom = "rust-geom";
extern mod geom;
extern mod http;
extern mod servo_util (name = "util");
extern mod stb_image;

View file

@ -13,7 +13,7 @@
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
extern mod geom = "rust-geom";
extern mod geom;
extern mod hubbub;
extern mod encoding;
extern mod js;

View file

@ -11,7 +11,7 @@
#[feature(macro_rules, managed_boxes)];
extern mod extra;
extern mod geom = "rust-geom";
extern mod geom;
pub mod cache;
pub mod geometry;

@ -1 +1 @@
Subproject commit 4466b6fb89ffd45222176d9381c19aa474ef8a33
Subproject commit 965cc1f01134e186f01f048639b5ab1593f6d3c2

@ -1 +1 @@
Subproject commit b41b972fbd67f2fba966753d67e735c0431d1cf2
Subproject commit 0a9090b60dc5ec8516ae73ae4398c91727231df6

@ -1 +1 @@
Subproject commit 5439c904951dcb9435e9c52fb0e53a1d853c5850
Subproject commit bfb234fbafb11beeecb81dc763ecf8c7ab539239

@ -1 +1 @@
Subproject commit c046cbbd346cc5abead05d17b0f1669110c1cb3e
Subproject commit bb5d9a1d1bb6e9720d3cd46b14530f24cccf51b6

@ -1 +1 @@
Subproject commit 1cb5c9274291d97d87648ced60510f30c54f94a1
Subproject commit 516e2c11b4ecc464f166a9b2a16d7bf25044c5d2

@ -1 +1 @@
Subproject commit a9fd3aa3ca7eba68f4bcd8906e281f27b78fda38
Subproject commit ce3cdc68b942cabfaa766d0cfe34ecf758623fb9

@ -1 +1 @@
Subproject commit 60ee86c802f45a8e87fa462cd21d4b074f837cec
Subproject commit b6fd2d88ad921f6f36fc8ac1fdd5437e0ba1a451

@ -1 +1 @@
Subproject commit 83f47c9b3129fed40ae9680d84dade478f331745
Subproject commit 928ee9d5055acd84a2f084b40c33e8556cbd0087

@ -1 +1 @@
Subproject commit c86eaa809c906d70aef4f3af0ac9f7377cc8e8ca
Subproject commit 985790fe16d10d50391675d00df832fc2b8e1048

@ -1 +1 @@
Subproject commit 0d47098172620e4e10d1639732c9755eb9956e0f
Subproject commit 60776fdefad6c94fb08ca82b1b853340878c2ffa

@ -1 +1 @@
Subproject commit b80b6cd976a75a329abbed72a0c999797a20f5a9
Subproject commit bb10edb7fb2428322a45664ebe8a9e0ce1679db4