Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 19308431FBC for ; Fri, 20 Nov 2009 05:18:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9F+E0v2X3ljI for ; Fri, 20 Nov 2009 05:18:38 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 23C86431FAE for ; Fri, 20 Nov 2009 05:18:38 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 9ADC98C069 for ; Fri, 20 Nov 2009 14:18:36 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBTNb-0003pl-95 for notmuch@notmuchmail.org; Fri, 20 Nov 2009 19:18:27 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 19:18:27 +0600 Message-Id: <1258723107-14704-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] RFC: quiet make X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 13:18:39 -0000 I don't entirely like duplicating every command line in makefile, so this patch is RFC. Someone with bigger Make-fu than mine probably knows a better way. Signed-off-by: Mikhail Gusarov --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ Makefile.local | 10 ++++++++++ lib/Makefile.local | 5 +++++ 3 files changed, 51 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index b6861e9..72a72ae 100644 --- a/Makefile +++ b/Makefile @@ -32,29 +32,65 @@ include lib/Makefile.local include Makefile.config %.o: %.cc $(all_deps) +ifeq ($(V),1) $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ +else + @echo CXX $< + @$(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ +endif %.o: %.c $(all_deps) +ifeq ($(V),1) $(CC) -c $(CFLAGS) $< -o $@ +else + @echo CC $< + @$(CC) -c $(CFLAGS) $< -o $@ +endif %.elc: %.el +ifeq ($(V),1) emacs -batch -f batch-byte-compile $< +else + @echo ELCOMPILE $< + @emacs -batch -f batch-byte-compile $< +endif .deps/%.d: %.c $(all_deps) +ifeq ($(V),1) + set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ + $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ + sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ +else + @echo DEPCXX $< @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ +endif .deps/%.d: %.cc $(all_deps) +ifeq ($(V),1) + set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ + $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ + sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ +else + @echo DEPCC $< @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ +endif DEPS := $(SRCS:%.c=.deps/%.d) DEPS := $(DEPS:%.cc=.deps/%.d) -include $(DEPS) clean: +ifeq ($(V),1) rm -f $(CLEAN); rm -rf .deps +else + @echo CLEAN + @rm -f $(CLEAN); rm -rf .deps +endif diff --git a/Makefile.local b/Makefile.local index bf81c03..0addfed 100644 --- a/Makefile.local +++ b/Makefile.local @@ -20,10 +20,20 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/notmuch.a +ifeq ($(V),1) $(CXX) $^ $(LDFLAGS) -o $@ +else + @echo LINK $^ + @$(CXX) $^ $(LDFLAGS) -o $@ +endif notmuch.1.gz: notmuch.1 +ifeq ($(V),1) gzip --stdout notmuch.1 > notmuch.1.gz +else + @echo GZIP $< + @gzip --stdout notmuch.1 > notmuch.1.gz +endif install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \ diff --git a/lib/Makefile.local b/lib/Makefile.local index 79f7b0b..5a66716 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -18,7 +18,12 @@ libnotmuch_cxx_srcs = \ libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o) $(dir)/notmuch.a: $(libnotmuch_modules) +ifeq ($(V),1) $(AR) rcs $@ $^ +else + @echo AR $^ + @$(AR) rcs $@ $^ +endif SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a -- 1.6.3.3