From 2539bf744fbd86d0b8ffbc5866789af795320b80 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Mon, 22 Jul 2013 20:36:14 -0600 Subject: [PATCH] Prettify make output during builds. --- Makefile.in | 26 +++++++++++++++++--------- mk/check.mk | 30 ++++++++++++++++++++---------- mk/clean.mk | 26 ++++++++++++++++---------- 3 files changed, 53 insertions(+), 29 deletions(-) diff --git a/Makefile.in b/Makefile.in index d53494f634bd..5d136a17fc79 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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): @@ -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 @@ -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) \ @@ -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 diff --git a/mk/check.mk b/mk/check.mk index 2b9253fe3267..f461ac1d0470 100644 --- a/mk/check.mk +++ b/mk/check.mk @@ -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)) \ @@ -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)) @@ -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 diff --git a/mk/clean.mk b/mk/clean.mk index 946c131d4c4c..4ba5f538a4e9 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -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