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 15A9C6DE02CD for ; Sun, 8 Jan 2017 14:09:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.511 X-Spam-Level: X-Spam-Status: No, score=0.511 tagged_above=-999 required=5 tests=[AWL=-0.141, SPF_NEUTRAL=0.652] 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 kiJ8yYIKsktv for ; Sun, 8 Jan 2017 14:09:07 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 00E2B6DE01CE for ; Sun, 8 Jan 2017 14:09:06 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id BE290100090; Mon, 9 Jan 2017 00:08:56 +0200 (EET) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [RFC PATCH] rfc: make 'make distclean' always use current Makefile.config In-Reply-To: <8737gucmmi.fsf@tethera.net> References: <20170106193254.12309-1-tomi.ollila@iki.fi> <8737gucmmi.fsf@tethera.net> User-Agent: Notmuch/0.23.3+85~g2b85e66 (https://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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: Sun, 08 Jan 2017 22:09:08 -0000 On Sun, Jan 08 2017, David Bremner wrote: > Tomi Ollila writes: > > I like the idea here; it's an annoying wait. Could we do something > similar for make clean? yes exact `make clean`, see below. > >> ... and not recreate it (slowly) if 'configure' changed, just to >> be deleteted later during 'make distclean'. > spellink > >> +# 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) > > Two comments > > - do we want to check for exactly distclean, or distclean one of the > goals? > > - it turns out that specifying e.g. "make distclean all" is currently > broken (before your patch) I tried to make support for 'make distclean all', but it just doesn't work w/o heavy trickery. After `make distclean all` has removed Makefile.config the prerequisities of 'all' starts to run; it mysteriously fails (but if it did not, new Makefile.config was not created -- but if new Makefile.config was created, make would re-exec itself as `make distclean all` since a file it included changed (and it would re-remove Makefile.config...)). I tried an alternative for `make clean all`, where 'all:' rule line in the beginning of Makefile.local had an ifeq alternative `$(MAKE) all configure_options=$(configure_options)` and without prerequisities 'notmuch notmuch-shared build-man ruby-bindings'. "Unfortunately" e.g. emacs/Makefile.local also adds prerequisities for all: -- and with those building emacs/notmuch-version.el fails (I don't understand why, but it does). Setting all these prerequisities could be ifneq()'d out but that is just complexity. So, for developer convenience we can add cleanup speedup for `make clean`, `make distclean` (and `make dataclean` if desired), and user has to explicitly execute e.g. `make distclean && make all` to do this kind of multiple targets... Tomi PS: I'd be interested to know whether it is possible to `make distclean all` with autoconf-generated Makefiles...