From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 5D3CE6DE0A77 for ; Fri, 6 Jan 2017 11:33:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.182 X-Spam-Level: X-Spam-Status: No, score=0.182 tagged_above=-999 required=5 tests=[AWL=0.191, HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c114zaz6WjHT for ; Fri, 6 Jan 2017 11:33:06 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id D83C26DE0999 for ; Fri, 6 Jan 2017 11:33:05 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 51CE51001E4; Fri, 6 Jan 2017 21:32:56 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Cc: tomi.ollila@iki.fi Subject: [RFC PATCH] rfc: make 'make distclean' always use current Makefile.config Date: Fri, 6 Jan 2017 21:32:54 +0200 Message-Id: <20170106193254.12309-1-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.11.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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, 06 Jan 2017 19:33:07 -0000 ... and not recreate it (slowly) if 'configure' changed, just to be deleteted later during 'make distclean'. For cleaning the old Makefile.config might actually be more accurate if configure changes what will be cleaned later... --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0ef57fa..be527e9 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,13 @@ include Makefile.config global_deps = Makefile Makefile.config Makefile.local \ $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local) -Makefile.config: $(srcdir)/configure +# In case of 'make distclean' have configure as order-only prerequisite so +# that Makefile.config is not recreated when configure is newer than it is. +ifeq ($(MAKECMDGOALS),distclean) +Makefile.config: | $(srcdir)/configure +else +Makefile.config: $(srcdir)/configure +endif ifeq ($(configure_options),) @echo "" @echo "Note: Calling ./configure with no command-line arguments. This is often fine," -- 2.7.4