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 710FC431FBF for ; Wed, 18 Nov 2009 16:37:31 -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 FxVeyo4NEuzX for ; Wed, 18 Nov 2009 16:37:30 -0800 (PST) Received: from mail.iptel.org (smtp.iptel.org [213.192.59.67]) by olra.theworths.org (Postfix) with ESMTP id ACF0D431FBC for ; Wed, 18 Nov 2009 16:37:30 -0800 (PST) Received: by mail.iptel.org (Postfix, from userid 103) id 1EAA63707E1; Thu, 19 Nov 2009 01:37:27 +0100 (CET) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.iptel.org (Postfix) with ESMTPSA id B33C03707BE for ; Thu, 19 Nov 2009 01:37:26 +0100 (CET) Received: by x61s.janakj (Postfix, from userid 1000) id DF4B3440655; Thu, 19 Nov 2009 01:37:25 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 01:37:25 +0100 Message-Id: <1258591045-16494-1-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Makefile: Make object targets depend on Makefiles 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: Thu, 19 Nov 2009 00:37:31 -0000 All objects need to be recompiled when any of the Makefiles changes, so we make them all depend on all the Makefiles. Signed-off-by: Jan Janak --- Makefile | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 96aaa73..2787aff 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ CFLAGS=-O2 extra_cflags = `pkg-config --cflags glib-2.0 gmime-2.4 talloc` extra_cxxflags = `xapian-config --cxxflags` +all_deps = Makefile Makefile.local Makefile.config \ + lib/Makefile lib/Makefile.local + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -21,19 +24,19 @@ include lib/Makefile.local # And get user settings from the output of configure include Makefile.config -%.o: %.cc +%.o: %.cc $(all_deps) $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ -%.o: %.c +%.o: %.c $(all_deps) $(CC) -c $(CFLAGS) $< -o $@ -.deps/%.d: %.c +.deps/%.d: %.c $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ -.deps/%.d: %.cc +.deps/%.d: %.cc $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ -- 1.6.3.3