auto merge of #615 : metajack/servo/pretty-make, r=jdm

This commit is contained in:
bors-servo 2013-07-22 19:51:20 -07:00
commit edca186d52
3 changed files with 53 additions and 29 deletions

View file

@ -79,10 +79,12 @@ $(S)config.stamp : $(S)configure $(S)Makefile.in
# Build the compiler # Build the compiler
ifneq ($(CFG_LOCAL_RUSTC),1) ifneq ($(CFG_LOCAL_RUSTC),1)
$(CFG_RUSTC): $(CFG_RUSTC):
$(MAKE) -C "$(CFG_BUILD_DIR)src/compiler/rust" CFG_RUSTC_FLAGS="" RUSTFLAGS="" @$(call E, building rustc)
$(Q)$(MAKE) -C "$(CFG_BUILD_DIR)src/compiler/rust" CFG_RUSTC_FLAGS="" RUSTFLAGS=""
clean-rust: clean-rust:
$(MAKE) -C "$(CFG_BUILD_DIR)src/compiler/rust" CFG_RUSTC_FLAGS="" RUSTFLAGS="" clean @$(call E, cleaning rustc)
$(Q)$(MAKE) -C "$(CFG_BUILD_DIR)src/compiler/rust" CFG_RUSTC_FLAGS="" RUSTFLAGS="" clean
else else
$(CFG_RUSTC): $(CFG_RUSTC):
@ -232,19 +234,24 @@ all: src/compiler/rust/rust-auto-clean-stamp servo package
# Servo helper libraries # Servo helper libraries
$(DONE_util): $(DEPS_util) $(DONE_util): $(DEPS_util)
$(RUSTC) $(RFLAGS_util) -o $@ $< && touch $@ @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_util) -o $@ $< && touch $@
$(DONE_net): $(DEPS_net) $(DONE_net): $(DEPS_net)
$(RUSTC) $(RFLAGS_net) -o $@ $< && touch $@ @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_net) -o $@ $< && touch $@
$(DONE_msg): $(DEPS_msg) $(DONE_msg): $(DEPS_msg)
$(RUSTC) $(RFLAGS_msg) -o $@ $< && touch $@ @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_msg) -o $@ $< && touch $@
$(DONE_gfx): $(DEPS_gfx) $(DONE_gfx): $(DEPS_gfx)
$(RUSTC) $(RFLAGS_gfx) -o $@ $< && touch $@ @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_gfx) -o $@ $< && touch $@
$(DONE_script): $(DEPS_script) $(DONE_script): $(DEPS_script)
$(RUSTC) $(RFLAGS_script) -o $@ $< && touch $@ @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_script) -o $@ $< && touch $@
BINDINGS_SRC = $(S)/src/components/script/dom/bindings/codegen BINDINGS_SRC = $(S)/src/components/script/dom/bindings/codegen
@ -254,7 +261,7 @@ bindinggen_dependencies := $(addprefix $(BINDINGS_SRC)/, BindingGen.py Bindings.
$(AUTOGEN_SRC_script): %Binding.rs: $(bindinggen_dependencies) \ $(AUTOGEN_SRC_script): %Binding.rs: $(bindinggen_dependencies) \
%.webidl %.webidl
@echo "Maybe generating $(shell basename $@)..." @$(call E, "Maybe generating $(shell basename $@)...")
$(Q)PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \ $(Q)PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \
-I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \
-D$(BINDINGS_SRC) \ -D$(BINDINGS_SRC) \
@ -280,7 +287,8 @@ $(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) \
# Servo binaries # Servo binaries
servo: $(DEPS_servo) servo: $(DEPS_servo)
$(RUSTC) $(RFLAGS_servo) -o $@ $< --bin @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_servo) -o $@ $< --bin
# Darwin app packaging # Darwin app packaging

View file

@ -2,7 +2,7 @@ define DEF_SUBMODULE_TEST_RULES
# check target # check target
.PHONY: check-$(1) .PHONY: check-$(1)
check-$(1) : $$(DONE_$(1)) check-$(1) : $$(DONE_$(1))
@$$(call E, make check: $(1)) @$$(call E, check: $(1))
$$(Q) \ $$(Q) \
$$(ENV_CFLAGS_$(1)) \ $$(ENV_CFLAGS_$(1)) \
@ -19,13 +19,16 @@ $(eval $(call DEF_SUBMODULE_TEST_RULES,$(submodule))))
# Testing targets # Testing targets
servo-test: $(DEPS_servo) servo-test: $(DEPS_servo)
$(RUSTC) $(RFLAGS_servo) --test -o $@ $< @$(call E, check: servo)
$(Q)$(RUSTC) $(RFLAGS_servo) --test -o $@ $<
reftest: $(S)src/test/harness/reftest/reftest.rs servo reftest: $(S)src/test/harness/reftest/reftest.rs servo
$(RUSTC) -o $@ $< @$(call E, compile: $@)
$(Q)$(RUSTC) -o $@ $<
contenttest: $(S)src/test/harness/contenttest/contenttest.rs servo contenttest: $(S)src/test/harness/contenttest/contenttest.rs servo
$(RUSTC) $(RFLAGS_servo) -o $@ $< -L . @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_servo) -o $@ $< -L .
DEPS_CHECK_TESTABLE = $(filter-out $(NO_TESTS),$(DEPS_CHECK_ALL)) DEPS_CHECK_TESTABLE = $(filter-out $(NO_TESTS),$(DEPS_CHECK_ALL))
@ -34,26 +37,33 @@ DEPS_CHECK_TARGETS_FAST = $(addprefix check-,$(filter-out $(SLOW_TESTS),$(DEPS_C
.PHONY: check-test .PHONY: check-test
check-test: check-test:
echo $(DEPS_CHECK_TARGETS_ALL) @$(call E, check:)
@$(call E, " $(DEPS_CHECK_TARGETS_ALL)")
.PHONY: check .PHONY: check
check: $(DEPS_CHECK_TARGETS_FAST) check-servo tidy check: $(DEPS_CHECK_TARGETS_FAST) check-servo tidy
@$(call E, check: all)
.PHONY: check-all .PHONY: check-all
check-all: $(DEPS_CHECK_TARGETS_ALL) check-servo tidy check-all: $(DEPS_CHECK_TARGETS_ALL) check-servo tidy
@$(call E, check: all)
.PHONY: check-servo .PHONY: check-servo
check-servo: servo-test check-servo: servo-test
./servo-test @$(call E, check: servo)
$(Q)./servo-test
.PHONY: check-ref .PHONY: check-ref
check-ref: reftest check-ref: reftest
./reftest $(S)src/test/ref/*.list @$(call E, check: reftests)
$(Q)./reftest $(S)src/test/ref/*.list
.PHONY: check-content .PHONY: check-content
check-content: contenttest check-content: contenttest
./contenttest --source-dir=$(S)src/test/html/content $(TESTNAME) @$(call E, check: contenttests)
$(Q)./contenttest --source-dir=$(S)src/test/html/content $(TESTNAME)
.PHONY: tidy .PHONY: tidy
tidy: tidy:
python $(S)src/etc/tidy.py $(S)src @$(call E, check: tidy)
$(Q)python $(S)src/etc/tidy.py $(S)src

View file

@ -18,27 +18,33 @@ DEPS_CLEAN_TARGETS_FAST = $(addprefix clean-,$(filter-out $(SLOW_BUILDS),$(DEPS_
.PHONY: clean $(DEPS_CLEAN_TARGETS_ALL) .PHONY: clean $(DEPS_CLEAN_TARGETS_ALL)
clean: $(DEPS_CLEAN_TARGETS_ALL) clean-servo clean: $(DEPS_CLEAN_TARGETS_ALL) clean-servo
$(Q)echo "Cleaning targets:" @$(call E, "cleaning:")
$(Q)echo "$(DEPS_CLEAN_ALL)" @$(call E, " $(DEPS_CLEAN_ALL)")
clean-fast: $(DEPS_CLEAN_TARGETS_FAST) clean-servo clean-fast: $(DEPS_CLEAN_TARGETS_FAST) clean-servo
$(Q)echo "Cleaning targets:" @$(call E, "cleaning:")
$(Q)echo "$(filter-out $(SLOW_BUILDS),$(DEPS_CLEAN_ALL))" @$(call E, " $(filter-out $(SLOW_BUILDS),$(DEPS_CLEAN_ALL))")
clean-util: clean-util:
cd $(B)/src/components/util/ && rm -rf libutil*.dylib libutil*.so $(DONE_util) @$(call E, "cleaning util")
$(Q)cd $(B)/src/components/util/ && rm -rf libutil*.dylib libutil*.so $(DONE_util)
clean-msg: clean-msg:
cd $(B)/src/components/msg/ && rm -rf libmsg*.dylib libmsg*.so $(DONE_msg) @$(call E, "cleaning msg")
$(Q)cd $(B)/src/components/msg/ && rm -rf libmsg*.dylib libmsg*.so $(DONE_msg)
clean-net: clean-net:
cd $(B)/src/components/net/ && rm -rf libnet*.dylib libnet*.so $(DONE_net) @$(call E, "cleaning net")
$(Q)cd $(B)/src/components/net/ && rm -rf libnet*.dylib libnet*.so $(DONE_net)
clean-gfx: clean-gfx:
cd $(B)/src/components/gfx/ && rm -rf libgfx*.dylib libgfx*.so $(DONE_gfx) @$(call E, "cleaning gfx")
$(Q)cd $(B)/src/components/gfx/ && rm -rf libgfx*.dylib libgfx*.so $(DONE_gfx)
clean-script: clean-script:
cd $(B)/src/components/script/ && rm -rf libscript*.dylib libscript*.so $(DONE_script) @$(call E, "cleaning script")
$(Q)cd $(B)/src/components/script/ && rm -rf libscript*.dylib libscript*.so $(DONE_script)
clean-servo: clean-gfx clean-util clean-net clean-script clean-msg clean-servo: clean-gfx clean-util clean-net clean-script clean-msg
rm -f servo servo-test @$(call E, "cleaning servo")
$(Q)rm -f servo servo-test