Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettify make output during builds. #615

Merged
merged 1 commit into from
Jul 23, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ $(S)config.stamp : $(S)configure $(S)Makefile.in
# Build the compiler
ifneq ($(CFG_LOCAL_RUSTC),1)
$(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:
$(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
$(CFG_RUSTC):
Expand Down Expand Up @@ -232,19 +234,24 @@ all: src/compiler/rust/rust-auto-clean-stamp servo package
# Servo helper libraries

$(DONE_util): $(DEPS_util)
$(RUSTC) $(RFLAGS_util) -o $@ $< && touch $@
@$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_util) -o $@ $< && touch $@

$(DONE_net): $(DEPS_net)
$(RUSTC) $(RFLAGS_net) -o $@ $< && touch $@
@$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_net) -o $@ $< && touch $@

$(DONE_msg): $(DEPS_msg)
$(RUSTC) $(RFLAGS_msg) -o $@ $< && touch $@
@$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_msg) -o $@ $< && touch $@

$(DONE_gfx): $(DEPS_gfx)
$(RUSTC) $(RFLAGS_gfx) -o $@ $< && touch $@
@$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_gfx) -o $@ $< && touch $@

$(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

Expand All @@ -254,7 +261,7 @@ bindinggen_dependencies := $(addprefix $(BINDINGS_SRC)/, BindingGen.py Bindings.

$(AUTOGEN_SRC_script): %Binding.rs: $(bindinggen_dependencies) \
%.webidl
@echo "Maybe generating $(shell basename $@)..."
@$(call E, "Maybe generating $(shell basename $@)...")
$(Q)PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \
-I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \
-D$(BINDINGS_SRC) \
Expand All @@ -280,7 +287,8 @@ $(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) \
# Servo binaries

servo: $(DEPS_servo)
$(RUSTC) $(RFLAGS_servo) -o $@ $< --bin
@$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_servo) -o $@ $< --bin

# Darwin app packaging

Expand Down
30 changes: 20 additions & 10 deletions mk/check.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ define DEF_SUBMODULE_TEST_RULES
# check target
.PHONY: check-$(1)
check-$(1) : $$(DONE_$(1))
@$$(call E, make check: $(1))
@$$(call E, check: $(1))

$$(Q) \
$$(ENV_CFLAGS_$(1)) \
Expand All @@ -19,13 +19,16 @@ $(eval $(call DEF_SUBMODULE_TEST_RULES,$(submodule))))
# Testing targets

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
$(RUSTC) -o $@ $<
@$(call E, compile: $@)
$(Q)$(RUSTC) -o $@ $<

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))
Expand All @@ -34,26 +37,33 @@ DEPS_CHECK_TARGETS_FAST = $(addprefix check-,$(filter-out $(SLOW_TESTS),$(DEPS_C

.PHONY: check-test
check-test:
echo $(DEPS_CHECK_TARGETS_ALL)
@$(call E, check:)
@$(call E, " $(DEPS_CHECK_TARGETS_ALL)")

.PHONY: check
check: $(DEPS_CHECK_TARGETS_FAST) check-servo tidy
@$(call E, check: all)

.PHONY: check-all
check-all: $(DEPS_CHECK_TARGETS_ALL) check-servo tidy
@$(call E, check: all)

.PHONY: check-servo
check-servo: servo-test
./servo-test
@$(call E, check: servo)
$(Q)./servo-test

.PHONY: check-ref
check-ref: reftest
./reftest $(S)src/test/ref/*.list
@$(call E, check: reftests)
$(Q)./reftest $(S)src/test/ref/*.list

.PHONY: check-content
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
tidy:
python $(S)src/etc/tidy.py $(S)src
tidy:
@$(call E, check: tidy)
$(Q)python $(S)src/etc/tidy.py $(S)src
26 changes: 16 additions & 10 deletions mk/clean.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,33 @@ DEPS_CLEAN_TARGETS_FAST = $(addprefix clean-,$(filter-out $(SLOW_BUILDS),$(DEPS_
.PHONY: clean $(DEPS_CLEAN_TARGETS_ALL)

clean: $(DEPS_CLEAN_TARGETS_ALL) clean-servo
$(Q)echo "Cleaning targets:"
$(Q)echo "$(DEPS_CLEAN_ALL)"
@$(call E, "cleaning:")
@$(call E, " $(DEPS_CLEAN_ALL)")

clean-fast: $(DEPS_CLEAN_TARGETS_FAST) clean-servo
$(Q)echo "Cleaning targets:"
$(Q)echo "$(filter-out $(SLOW_BUILDS),$(DEPS_CLEAN_ALL))"
@$(call E, "cleaning:")
@$(call E, " $(filter-out $(SLOW_BUILDS),$(DEPS_CLEAN_ALL))")

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:
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:
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:
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:
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
rm -f servo servo-test
@$(call E, "cleaning servo")
$(Q)rm -f servo servo-test