unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Prefix lib/notmuch.h and lib/gen-version-script.sh with $(srcdir)
@ 2011-10-23 14:44 Amadeusz Żołnowski
  2011-10-25  1:08 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Amadeusz Żołnowski @ 2011-10-23 14:44 UTC (permalink / raw)
  To: notmuch; +Cc: Amadeusz Żołnowski

lib/notmuch.h and lib/gen-version-script.sh couldn't have been found
when building out of sources directory.
---
 lib/Makefile.local |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lib/Makefile.local b/lib/Makefile.local
index ea20b2b..be51eaa 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -41,6 +41,11 @@ endif
 dir := lib
 extra_cflags += -I$(srcdir)/$(dir) -fPIC
 
+# The (often-reused) $dir works fine within targets/prerequisites,
+# but cannot be used reliably within commands, so copy its value to a
+# variable that is not reused.
+lib := $(dir)
+
 libnotmuch_c_srcs =		\
 	$(notmuch_compat_srcs)	\
 	$(dir)/filenames.c	\
@@ -68,8 +73,8 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
 $(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym
 	$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@
 
-notmuch.sym: lib/notmuch.h $(libnotmuch_modules)
-	sh lib/gen-version-script.sh $< $(libnotmuch_modules) > $@
+notmuch.sym: $(srcdir)/$(dir)/notmuch.h $(libnotmuch_modules)
+	sh $(srcdir)/$(lib)/gen-version-script.sh $< $(libnotmuch_modules) > $@
 
 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
 	ln -sf $(LIBNAME) $@
@@ -79,10 +84,6 @@ $(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
 
 install: install-$(dir)
 
-# The (often-reused) $dir works fine within targets/prerequisites,
-# but cannot be used reliably within commands, so copy its value to a
-# variable that is not reused.
-lib := $(dir)
 install-$(dir): $(dir)/$(LIBNAME)
 	mkdir -p "$(DESTDIR)$(libdir)/"
 	install -m0644 "$(lib)/$(LIBNAME)" "$(DESTDIR)$(libdir)/"
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Prefix lib/notmuch.h and lib/gen-version-script.sh with $(srcdir)
  2011-10-23 14:44 [PATCH] Prefix lib/notmuch.h and lib/gen-version-script.sh with $(srcdir) Amadeusz Żołnowski
@ 2011-10-25  1:08 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2011-10-25  1:08 UTC (permalink / raw)
  To: Amadeusz Żołnowski, notmuch

On Sun, 23 Oct 2011 16:44:01 +0200, Amadeusz Żołnowski <aidecoe@aidecoe.name> wrote:
> lib/notmuch.h and lib/gen-version-script.sh couldn't have been found
> when building out of sources directory.

Pushed, welcome to notmuch !

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-25  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-23 14:44 [PATCH] Prefix lib/notmuch.h and lib/gen-version-script.sh with $(srcdir) Amadeusz Żołnowski
2011-10-25  1:08 ` David Bremner

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).