unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH 2/3] ruby: don't use a directory as a target.
Date: Sat, 30 Oct 2021 17:48:54 -0300	[thread overview]
Message-ID: <20211030204855.1581540-3-david@tethera.net> (raw)
In-Reply-To: <20211030204855.1581540-1-david@tethera.net>

The directory is (neccesarily) not updated by the build, so it keeps
trying to build. The proposed fix is to use the name of the dynamic
library containing the extension.  This is a partial fix for the
rebuilding reported at [1].

[1]: id:87r29wwgq2.fsf@fifthhorseman.net
---
 bindings/Makefile.local | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/bindings/Makefile.local b/bindings/Makefile.local
index 3672e69f..1cdd28a0 100644
--- a/bindings/Makefile.local
+++ b/bindings/Makefile.local
@@ -3,21 +3,23 @@
 dir := bindings
 
 # force the shared library to be built
-ruby-bindings: lib/$(LINKER_NAME)
+ruby-bindings: $(dir)/ruby.stamp
+
+$(dir)/ruby.stamp: lib/$(LINKER_NAME)
 ifeq ($(HAVE_RUBY_DEV),1)
 	cd $(dir)/ruby && \
 		EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
 		LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
 		NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
 		$(RUBY) extconf.rb --vendor
-	$(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC"
+	$(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC" && touch $@
 endif
 
 python-cffi-bindings: lib/$(LINKER_NAME)
 ifeq ($(HAVE_PYTHON3_CFFI),1)
 	cd $(dir)/python-cffi && \
 		${PYTHON} setup.py build --build-lib build/stage && \
-		mkdir -p build/stage/tests && cp tests/*.py build/stage/tests
+		mkdir -p build/stage/tests && cp tests/*.py build/stage/tests && touch ../../$@
 endif
 
 CLEAN += $(patsubst %,$(dir)/ruby/%, \
@@ -26,6 +28,6 @@ CLEAN += $(patsubst %,$(dir)/ruby/%, \
 	init.o message.o messages.o mkmf.log notmuch.so query.o \
 	status.o tags.o thread.o threads.o)
 
-CLEAN += bindings/ruby/.vendorarchdir.time
+CLEAN += bindings/ruby/.vendorarchdir.time $(dir)/ruby.stamp
 
 CLEAN += bindings/python-cffi/build
-- 
2.33.0

  parent reply	other threads:[~2021-10-30 20:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20 20:43 subsequent rebuilds of notmuch always re-build sphinx and ruby Daniel Kahn Gillmor
2019-04-21  0:12 ` David Bremner
2019-04-21  3:14   ` Daniel Kahn Gillmor
2019-04-21 19:29     ` David Bremner
2019-04-22 23:19       ` Daniel Kahn Gillmor
2019-04-23  0:03         ` David Bremner
2019-04-23 21:43           ` Daniel Kahn Gillmor
2019-04-24  1:09             ` David Bremner
2019-04-24  5:11               ` Daniel Kahn Gillmor
2021-12-24 16:20             ` [PATCH] doc: add dep. on stamp file for rebuilding gzipped man pages David Bremner
2021-12-25  9:39               ` Tomi Ollila
2021-12-25 11:37               ` David Bremner
2021-10-30 20:48 ` Add stamp files to prevent rebuilds David Bremner
2021-10-30 20:48   ` [PATCH 1/3] doc: introduce stamp file for info build David Bremner
2021-10-30 20:48   ` David Bremner [this message]
2021-10-30 20:48   ` [PATCH 3/3] python-cffi: introduce stamp file David Bremner
2021-12-04 23:44   ` Add stamp files to prevent rebuilds David Bremner
2021-12-04 23:47   ` [PATCH 1/2] doc: replace phony target with variable David Bremner
2021-12-04 23:47     ` [PATCH 2/2] doc: introduce stamp file for info build David Bremner
2021-12-23 12:24     ` [PATCH 1/2] doc: replace phony target with variable 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=20211030204855.1581540-3-david@tethera.net \
    --to=david@tethera.net \
    --cc=dkg@fifthhorseman.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).