Module: sip-router Branch: master Commit: e37e8d6a6158d49aa5fa1092d91b595cf0d91e2d URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e37e8d6a...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Fri Oct 9 15:30:02 2009 +0200
makefile: quiet output support
Support for quiet output (without all the flags and compile options): make Q=1 or make QUIET=1. It can be saved in the config (e.g. make config Q=1) and it can be overridden any time (e.g. make utils Q=0). Compilation is a little faster in quiet mode and the same speed as before in normal mode.
Example module output: CC (gcc) [M tm.so] uac.o LD (gcc) [M tm.so] tm.so
Lib example: LD (gcc) [L libbinrpc.so.0.1] libbinrpc.so.0.1
---
Makefile.defs | 3 ++- Makefile.rules | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs index f883a0b..a9bd307 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -1901,7 +1901,8 @@ saved_fixed_vars:= MAIN_NAME CFG_NAME SCR_NAME \ PREFIX LOCALBASE \ TAR \ INSTALL INSTALL_CFG INSTALL_BIN INSTALL_MODULES INSTALL_DOC \ - INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE + INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE \ + Q
# variable changeable at compile time # extra: prefix DESTDIR BASEDIR basedirt diff --git a/Makefile.rules b/Makefile.rules index 99042c3..55c7897 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -52,9 +52,33 @@ endif
ALLDEP+=makecfg.lst
+# returns current type: "" core/unknown, "M" module, "L" libray, "U" util +crt_type=$(if $(MOD_NAME),M,$(if $(LIB_NAME),L,$(if $(UTIL_NAME),U))) + +cmd_CC=$(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@ +cmd_LD=$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) \ + -o $(NAME) + +# what will be displayed if quiet==silent +silent_cmd_CC=CC ($(CC)) [$(strip $(crt_type) $(NAME))] $@ +silent_cmd_LD=LD ($(LD)) [$(strip $(crt_type) $(NAME))] $@ + +ifneq (,$(filter 1 yes on, $(Q) $(QUIET))) +quiet=silent +Q=1 +else +Q=0 +quiet=verbose +endif + +quote:= " +escall= $(subst $$,$$$$,$(subst $(quote),$(quote),$1)) +exec_cmd= $(if $($(quiet)_cmd_$(1)),\ + @echo "$(call escall,$($(quiet)_cmd_$(1)))" ;) $(cmd_$(1)) + #implicit rules %.o:%.c $(ALLDEP) - $(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@ + $(call exec_cmd,CC)
%.d: %.c $(ALLDEP) @set -e; $(MKDEP) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) $<\ @@ -149,7 +173,7 @@ endif
# normal rules $(NAME): $(objs) $(ALLDEP) - $(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) -o $(NAME) + $(call exec_cmd,LD)
librpath.lst: $(ALLDEP)
I like this, how about making the quiet mode default?
Jan.
On Fri, Oct 9, 2009 at 4:48 PM, Andrei Pelinescu-Onciul andrei@iptel.org wrote:
Module: sip-router Branch: master Commit: e37e8d6a6158d49aa5fa1092d91b595cf0d91e2d URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e37e8d6a...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Fri Oct 9 15:30:02 2009 +0200
makefile: quiet output support
Support for quiet output (without all the flags and compile options): make Q=1 or make QUIET=1. It can be saved in the config (e.g. make config Q=1) and it can be overridden any time (e.g. make utils Q=0). Compilation is a little faster in quiet mode and the same speed as before in normal mode.
Example module output: CC (gcc) [M tm.so] uac.o LD (gcc) [M tm.so] tm.so
Lib example: LD (gcc) [L libbinrpc.so.0.1] libbinrpc.so.0.1
Makefile.defs | 3 ++- Makefile.rules | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs index f883a0b..a9bd307 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -1901,7 +1901,8 @@ saved_fixed_vars:= MAIN_NAME CFG_NAME SCR_NAME \ PREFIX LOCALBASE \ TAR \ INSTALL INSTALL_CFG INSTALL_BIN INSTALL_MODULES INSTALL_DOC \
- INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE
- INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE \
- Q
# variable changeable at compile time # extra: prefix DESTDIR BASEDIR basedirt diff --git a/Makefile.rules b/Makefile.rules index 99042c3..55c7897 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -52,9 +52,33 @@ endif
ALLDEP+=makecfg.lst
+# returns current type: "" core/unknown, "M" module, "L" libray, "U" util +crt_type=$(if $(MOD_NAME),M,$(if $(LIB_NAME),L,$(if $(UTIL_NAME),U)))
+cmd_CC=$(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@ +cmd_LD=$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) \
- -o $(NAME)
+# what will be displayed if quiet==silent +silent_cmd_CC=CC ($(CC)) [$(strip $(crt_type) $(NAME))] $@ +silent_cmd_LD=LD ($(LD)) [$(strip $(crt_type) $(NAME))] $@
+ifneq (,$(filter 1 yes on, $(Q) $(QUIET))) +quiet=silent +Q=1 +else +Q=0 +quiet=verbose +endif
+quote:= " +escall= $(subst $$,$$$$,$(subst $(quote),$(quote),$1)) +exec_cmd= $(if $($(quiet)_cmd_$(1)),\
- @echo "$(call escall,$($(quiet)_cmd_$(1)))" ;) $(cmd_$(1))
#implicit rules %.o:%.c $(ALLDEP)
- $(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@
- $(call exec_cmd,CC)
%.d: %.c $(ALLDEP) @set -e; $(MKDEP) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) $<\ @@ -149,7 +173,7 @@ endif
# normal rules $(NAME): $(objs) $(ALLDEP)
- $(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) -o $(NAME)
- $(call exec_cmd,LD)
librpath.lst: $(ALLDEP)
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On Oct 10, 2009 at 22:01, Jan Janak jan@ryngle.com wrote:
I like this, how about making the quiet mode default?
I've started to like it too :-)
Anybody disagrees with making the quiet mode the default (you would need to make cfg Q=0 or make Q=0 ... to see the gcc comandline)? If nobody says anything in the next 7 days, I'll change it.
Andrei
On Fri, Oct 9, 2009 at 4:48 PM, Andrei Pelinescu-Onciul andrei@iptel.org wrote:
Module: sip-router Branch: master Commit: e37e8d6a6158d49aa5fa1092d91b595cf0d91e2d URL: ?? ??http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e37e8d6a...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: ?? Fri Oct ??9 15:30:02 2009 +0200
makefile: quiet output support
Support for quiet output (without all the flags and compile options): make Q=1 or make QUIET=1. It can be saved in the config (e.g. make config Q=1) and it can be overridden any time (e.g. make utils Q=0). Compilation is a little faster in quiet mode and the same speed as before in normal mode.
Example module output: CC (gcc) [M tm.so] ?? ?? ?? ?? ?? ?? ??uac.o LD (gcc) [M tm.so] ?? ?? ?? ?? ?? ?? ??tm.so
Lib example: LD (gcc) [L libbinrpc.so.0.1] ?? ?? ?? ?? ?? libbinrpc.so.0.1
??Makefile.defs ??| ?? ??3 ++- ??Makefile.rules | ?? 28 ++++++++++++++++++++++++++-- ??2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs index f883a0b..a9bd307 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -1901,7 +1901,8 @@ saved_fixed_vars:= ?? ?? ?? ??MAIN_NAME ??CFG_NAME SCR_NAME \ ?? ?? ?? ?? ?? ?? ?? ??PREFIX LOCALBASE \ ?? ?? ?? ?? ?? ?? ?? ??TAR \ ?? ?? ?? ?? ?? ?? ?? ??INSTALL INSTALL_CFG INSTALL_BIN INSTALL_MODULES INSTALL_DOC \
- ?? ?? ?? ?? ?? ?? ?? INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE
- ?? ?? ?? ?? ?? ?? ?? INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE \
- ?? ?? ?? ?? ?? ?? ?? Q
??# variable changeable at compile time ??# extra: prefix DESTDIR BASEDIR basedirt diff --git a/Makefile.rules b/Makefile.rules index 99042c3..55c7897 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -52,9 +52,33 @@ endif
??ALLDEP+=makecfg.lst
+# returns current type: "" core/unknown, "M" module, "L" libray, "U" util +crt_type=$(if $(MOD_NAME),M,$(if $(LIB_NAME),L,$(if $(UTIL_NAME),U)))
+cmd_CC=$(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@ +cmd_LD=$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) \
- ?? ?? ?? -o $(NAME)
+# what will be displayed if quiet==silent +silent_cmd_CC=CC ($(CC)) [$(strip $(crt_type) $(NAME))] ?? ?? ?? ?? ?? ?? ?? ??$@ +silent_cmd_LD=LD ($(LD)) [$(strip $(crt_type) $(NAME))] ?? ?? ?? ?? ?? ?? ?? ??$@
+ifneq (,$(filter 1 yes on, $(Q) $(QUIET))) +quiet=silent +Q=1 +else +Q=0 +quiet=verbose +endif
+quote:= " +escall= $(subst $$,$$$$,$(subst $(quote),$(quote),$1)) +exec_cmd= $(if $($(quiet)_cmd_$(1)),\
- ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? @echo "$(call escall,$($(quiet)_cmd_$(1)))" ;) $(cmd_$(1))
??#implicit rules ??%.o:%.c ??$(ALLDEP)
- ?? ?? ?? $(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@
- ?? ?? ?? $(call exec_cmd,CC)
??%.d: %.c $(ALLDEP) ?? ?? ?? ??@set -e; $(MKDEP) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) $<\ @@ -149,7 +173,7 @@ endif
??# normal rules ??$(NAME): $(objs) $(ALLDEP)
- ?? ?? ?? $(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) -o $(NAME)
- ?? ?? ?? $(call exec_cmd,LD)
??librpath.lst: $(ALLDEP)
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 03/18/2010 03:20 PM, Andrei Pelinescu-Onciul wrote:
On Oct 10, 2009 at 22:01, Jan Janakjan@ryngle.com wrote:
I like this, how about making the quiet mode default?
I've started to like it too :-)
Anybody disagrees with making the quiet mode the default (you would need to make cfg Q=0 or make Q=0 ... to see the gcc comandline)? If nobody says anything in the next 7 days, I'll change it.
It is ok for me, just a note about debian packaging. I remember I wanted to make it default in kamailio when I was taking care of deb packaging and guys from debian opposed because, iirc, their building systems keep and need all compilation flags and logs. Anyhow I guess this can be fixed in deb control files.
On another hand, would be possible to have Q=2 something like print all compile flags once (only for core, modules/libs may have extra) at beginning and then act as Q=1?
Cheers, Daniel
Andrei
On Fri, Oct 9, 2009 at 4:48 PM, Andrei Pelinescu-Onciul andrei@iptel.org wrote:
Module: sip-router Branch: master Commit: e37e8d6a6158d49aa5fa1092d91b595cf0d91e2d URL: ?? ??http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e37e8d6a...
Author: Andrei Pelinescu-Onciulandrei@iptel.org Committer: Andrei Pelinescu-Onciulandrei@iptel.org Date: ?? Fri Oct ??9 15:30:02 2009 +0200
makefile: quiet output support
Support for quiet output (without all the flags and compile options): make Q=1 or make QUIET=1. It can be saved in the config (e.g. make config Q=1) and it can be overridden any time (e.g. make utils Q=0). Compilation is a little faster in quiet mode and the same speed as before in normal mode.
Example module output: CC (gcc) [M tm.so] ?? ?? ?? ?? ?? ?? ??uac.o LD (gcc) [M tm.so] ?? ?? ?? ?? ?? ?? ??tm.so
Lib example: LD (gcc) [L libbinrpc.so.0.1] ?? ?? ?? ?? ?? libbinrpc.so.0.1
??Makefile.defs ??| ?? ??3 ++- ??Makefile.rules | ?? 28 ++++++++++++++++++++++++++-- ??2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs index f883a0b..a9bd307 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -1901,7 +1901,8 @@ saved_fixed_vars:= ?? ?? ?? ??MAIN_NAME ??CFG_NAME SCR_NAME \ ?? ?? ?? ?? ?? ?? ?? ??PREFIX LOCALBASE \ ?? ?? ?? ?? ?? ?? ?? ??TAR \ ?? ?? ?? ?? ?? ?? ?? ??INSTALL INSTALL_CFG INSTALL_BIN INSTALL_MODULES INSTALL_DOC \
- ?? ?? ?? ?? ?? ?? ?? INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE
- ?? ?? ?? ?? ?? ?? ?? INSTALL_MAN INSTALL_LIB INSTALL_TOUCH INSTALL_SHARE \
- ?? ?? ?? ?? ?? ?? ?? Q
??# variable changeable at compile time ??# extra: prefix DESTDIR BASEDIR basedirt diff --git a/Makefile.rules b/Makefile.rules index 99042c3..55c7897 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -52,9 +52,33 @@ endif
??ALLDEP+=makecfg.lst
+# returns current type: "" core/unknown, "M" module, "L" libray, "U" util +crt_type=$(if $(MOD_NAME),M,$(if $(LIB_NAME),L,$(if $(UTIL_NAME),U)))
+cmd_CC=$(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@ +cmd_LD=$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) \
- ?? ?? ?? -o $(NAME)
+# what will be displayed if quiet==silent +silent_cmd_CC=CC ($(CC)) [$(strip $(crt_type) $(NAME))] ?? ?? ?? ?? ?? ?? ?? ??$@ +silent_cmd_LD=LD ($(LD)) [$(strip $(crt_type) $(NAME))] ?? ?? ?? ?? ?? ?? ?? ??$@
+ifneq (,$(filter 1 yes on, $(Q) $(QUIET))) +quiet=silent +Q=1 +else +Q=0 +quiet=verbose +endif
+quote:= " +escall= $(subst $$,$$$$,$(subst $(quote),$(quote),$1)) +exec_cmd= $(if $($(quiet)_cmd_$(1)),\
- ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? @echo "$(call escall,$($(quiet)_cmd_$(1)))" ;) $(cmd_$(1))
??#implicit rules ??%.o:%.c ??$(ALLDEP)
- ?? ?? ?? $(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@
- ?? ?? ?? $(call exec_cmd,CC)
??%.d: %.c $(ALLDEP) ?? ?? ?? ??@set -e; $(MKDEP) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) $<\ @@ -149,7 +173,7 @@ endif
??# normal rules ??$(NAME): $(objs) $(ALLDEP)
- ?? ?? ?? $(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) -o $(NAME)
- ?? ?? ?? $(call exec_cmd,LD)
??librpath.lst: $(ALLDEP)
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On Thu, Mar 18, 2010 at 10:28 AM, Daniel-Constantin Mierla miconda@gmail.com wrote:
On 03/18/2010 03:20 PM, Andrei Pelinescu-Onciul wrote:
On Oct 10, 2009 at 22:01, Jan Janakjan@ryngle.com wrote:
I like this, how about making the quiet mode default?
I've started to like it too :-)
Anybody disagrees with making the quiet mode the default (you would need to make cfg Q=0 or make Q=0 ... to see the gcc comandline)? If nobody says anything in the next 7 days, I'll change it.
It is ok for me, just a note about debian packaging. I remember I wanted to make it default in kamailio when I was taking care of deb packaging and guys from debian opposed because, iirc, their building systems keep and need all compilation flags and logs. Anyhow I guess this can be fixed in deb control files.
I think that should be no problem, because Debian package maintainers use their own packaging files (not the ones we keep in the repository) and they can easily add Q=0. They'll have to use other command line options anyway to enable modules like db_mysql.
-Jan
On Thursday 18 March 2010, Andrei Pelinescu-Onciul wrote:
I've started to like it too :-)
Anybody disagrees with making the quiet mode the default (you would need to make cfg Q=0 or make Q=0 ... to see the gcc comandline)? If nobody says anything in the next 7 days, I'll change it.
Hi Andrei,
i also like it. :-) What about making it the default, as you suggested?
Cheers,
Henning
On Jun 15, 2010 at 17:05, Henning Westerholt henning.westerholt@1und1.de wrote:
On Thursday 18 March 2010, Andrei Pelinescu-Onciul wrote:
I've started to like it too :-)
Anybody disagrees with making the quiet mode the default (you would need to make cfg Q=0 or make Q=0 ... to see the gcc comandline)? If nobody says anything in the next 7 days, I'll change it.
Hi Andrei,
i also like it. :-) What about making it the default, as you suggested?
Done (I completely forgot about it :-)).
Andrei