osmith submitted this change.
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
buildsystem: make output more readable
Generate short and readable compile messages:
CC IPL4asp_PT.o
CCLD TCCInterface.so
CCLD TELNETasp_PT.so
CCLD MGCP_Test
Instead of the very verbose messages we would get otherwise. Especially
the linking message clutters a whole page of terminal output without
this path:
if ... g++ ... $ALL_OBJ_FILES; then : ; else ... $ALL_OBJ_FILES; fi
Change-Id: I780106e64089dc24a7ba724f6a94e67417d49c30
---
M _buildsystem/regen_makefile.inc.sh
1 file changed, 54 insertions(+), 0 deletions(-)
diff --git a/_buildsystem/regen_makefile.inc.sh b/_buildsystem/regen_makefile.inc.sh
index 497fa09..f9dcfe6 100644
--- a/_buildsystem/regen_makefile.inc.sh
+++ b/_buildsystem/regen_makefile.inc.sh
@@ -63,3 +63,57 @@
# with ccache.
sed -i -e 's/^COMPILER_FLAGS = \(.*\)/& -D/' Makefile
fi
+
+#
+# Make output more readable (skip with make V=1)
+#
+
+make_pretty_rule() {
+ local rule_name="$1"
+ local cmd_start="$2"
+ local cmd_msg="@echo ' $3'"
+
+ sed -i -z "s/$rule_name\\n\\t$cmd_start/$rule_name\\n\\t$cmd_msg\n\t@$cmd_start/" Makefile
+}
+
+make_pretty_rules() {
+ make_pretty_rule \
+ '$(EXECUTABLE): $(SHARED_OBJECTS)' \
+ 'if' \
+ 'CCLD $@'
+
+ make_pretty_rule \
+ '$(LIBRARY): $(OBJECTS)' \
+ '$(CXX)' \
+ 'CCLD $@'
+
+ make_pretty_rule \
+ '.cc.o .c.o:' \
+ '$(CXX)' \
+ 'CC $@'
+
+ make_pretty_rule \
+ '%.so: %.o' \
+ '$(CXX)' \
+ 'CCLD $@'
+
+ make_pretty_rule \
+ '%.ttcn: %.ttcnpp $(TTCN3_INCLUDES)' \
+ '$(CPP)' \
+ 'PP $@'
+
+ make_pretty_rule \
+ 'compile: $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES)' \
+ '$(TTCN3_DIR)' \
+ 'TTCN *.ttcn *.asn'
+
+ sed -i "s/@echo Creating dependency file for/@echo ' DEP '/" Makefile
+
+ # TTCN3 compiler: Silence "Notify: Parsing..." output with -q, it still
+ # prints warnings and errors
+ sed -i -e 's/^COMPILER_FLAGS = \(.*\)/& -q/' Makefile
+}
+
+if [ "$V" != 1 ]; then
+ make_pretty_rules
+fi
To view, visit change 40033. To unsubscribe, or for help writing mail filters, visit settings.