unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [RFC PATCH] rfc: make 'make distclean' always use current Makefile.config
Date: Mon, 09 Jan 2017 00:08:56 +0200	[thread overview]
Message-ID: <m2lgul432f.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <8737gucmmi.fsf@tethera.net>

On Sun, Jan 08 2017, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> 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...

  reply	other threads:[~2017-01-08 22:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 19:32 [RFC PATCH] rfc: make 'make distclean' always use current Makefile.config Tomi Ollila
2017-01-08  2:27 ` David Bremner
2017-01-08 22:08   ` Tomi Ollila [this message]
2017-01-11 22:07     ` [RFC PATCH 3] support goals after make *clean, *clean with " Tomi Ollila
2017-01-09 20:06   ` [RFC PATCH 2] opportunistic support for make {, dist, data}clean {all, test, install} Tomi Ollila
2017-01-12 20:38   ` [RFC PATCH 5] support make goals after initial *clean goal(s) Tomi Ollila
2017-01-16 18:04   ` [RFC PATCH 6] support make goals after initial {'', dist, data}clean goal(s) Tomi Ollila
2017-03-09 13:10     ` David Bremner
2017-03-09 15:51       ` Tomi Ollila
2017-03-10 12:20     ` David Bremner
2017-03-11 14:06     ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2lgul432f.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).