unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] man/Makefile.local: allow out-of-tree 'make install'.
@ 2013-08-03  9:36 Rory Yorke
  2013-08-03 21:12 ` Tomi Ollila
  0 siblings, 1 reply; 4+ messages in thread
From: Rory Yorke @ 2013-08-03  9:36 UTC (permalink / raw)
  To: notmuch

Change man-page source directory ('dir') to refer to srcdir.
---
 man/Makefile.local | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.local b/man/Makefile.local
index 216aaa0..768f4cf 100644
--- a/man/Makefile.local
+++ b/man/Makefile.local
@@ -1,6 +1,6 @@
 # -*- Makefile -*-
 
-dir := man
+dir := $(srcdir)/man
 
 # this variable seems to be needed to prevent lazy evaluation causing
 # problems with $(dir) changing values.
-- 
1.8.1.2

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

* Re: [PATCH] man/Makefile.local: allow out-of-tree 'make install'.
  2013-08-03  9:36 [PATCH] man/Makefile.local: allow out-of-tree 'make install' Rory Yorke
@ 2013-08-03 21:12 ` Tomi Ollila
  2013-08-04 12:36   ` Rory Yorke
  0 siblings, 1 reply; 4+ messages in thread
From: Tomi Ollila @ 2013-08-03 21:12 UTC (permalink / raw)
  To: Rory Yorke, notmuch

On Sat, Aug 03 2013, Rory Yorke <rory.yorke@gmail.com> wrote:

> Change man-page source directory ('dir') to refer to srcdir.
> ---
>  man/Makefile.local | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/Makefile.local b/man/Makefile.local
> index 216aaa0..768f4cf 100644
> --- a/man/Makefile.local
> +++ b/man/Makefile.local
> @@ -1,6 +1,6 @@
>  # -*- Makefile -*-
>  
> -dir := man
> +dir := $(srcdir)/man

Interesting...

$ grep '^dir ' **/Makefile*
compat/Makefile.local:dir := compat
completion/Makefile.local:dir := completion
emacs/Makefile.local:dir := emacs
lib/Makefile.local:dir := lib
man/Makefile.local:dir := man
parse-time-string/Makefile.local:dir := parse-time-string
performance-test/Makefile.local:dir := performance-test
test/Makefile.local:dir := test
util/Makefile.local:dir := util

So why $(srcdir)/ prefix is needed only here...

Tomi

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

* Re: [PATCH] man/Makefile.local: allow out-of-tree 'make install'.
  2013-08-03 21:12 ` Tomi Ollila
@ 2013-08-04 12:36   ` Rory Yorke
  2013-09-01 13:45     ` Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Rory Yorke @ 2013-08-04 12:36 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> So why $(srcdir)/ prefix is needed only here...

Hi,

I'm not sure; I'm afraid I just did something that worked for me.  It
was long enough ago that I don't remember how I came up with this
hack. 

Here's what appears to be some pertinent different behaviour between
master and my patch:

1. In empty directory ~/tmp/notmuch-build-master run ~/git/notmuch/configure, with ~/git/notmuch checked out as master:
2. Partial output of make -d -n install is:

    Considering target file `man/man1/notmuch-tag.1.gz'.
     File `man/man1/notmuch-tag.1.gz' does not exist.
     Looking for an implicit rule for `man/man1/notmuch-tag.1.gz'.
     Trying pattern rule with stem `notmuch-tag.1'.
     Trying implicit prerequisite `man/man1/notmuch-tag.1'.
     Found prerequisite `man/man1/notmuch-tag.1' as VPATH `/home/rory/git/notmuch/man/man1/notmuch-tag.1'
[many lines omitted]
    Must remake target `man/man1/notmuch-tag.1.gz'.
gzip --stdout /home/rory/git/notmuch/man/man1/notmuch-tag.1 > man/man1/notmuch-tag.1.gz
    Successfully remade target file `man/man1/notmuch-tag.1.gz'.
    Considering target file `man/man5/notmuch-hooks.5.gz'.
     File `man/man5/notmuch-hooks.5.gz' does not exist.
     Looking for an implicit rule for `man/man5/notmuch-hooks.5.gz'.
     Trying pattern rule with stem `notmuch-hooks.5'.
     Trying implicit prerequisite `man/man5/notmuch-hooks.5'.
     Trying pattern rule with stem `notmuch-hooks.5.gz'.
     Trying implicit prerequisite `man/man5/notmuch-hooks.5.gz,v'.
[many lines omitted]
    Must remake target `man/man5/notmuch-hooks.5.gz'.
make: *** No rule to make target `man/man5/notmuch-hooks.5.gz', needed by `install-man'.  Stop.

3. In empty directory ~/tmp/notmuch-build-rory run ~/git/notmuch/configure, with ~/git/notmuch checked out as rory.
4. Partial output of make -d -n install is:

    Considering target file `/home/rory/git/notmuch/man/man1/notmuch-tag.1.gz'.
     File `/home/rory/git/notmuch/man/man1/notmuch-tag.1.gz' does not exist.
     Looking for an implicit rule for `/home/rory/git/notmuch/man/man1/notmuch-tag.1.gz'.
     Trying pattern rule with stem `notmuch-tag.1'.
     Trying implicit prerequisite `/home/rory/git/notmuch/man/man1/notmuch-tag.1'.
     Found an implicit rule for `/home/rory/git/notmuch/man/man1/notmuch-tag.1.gz'.
[many lines omitted]
    Must remake target `/home/rory/git/notmuch/man/man1/notmuch-tag.1.gz'.
gzip --stdout /home/rory/git/notmuch/man/man1/notmuch-tag.1 > /home/rory/git/notmuch/man/man1/notmuch-tag.1.gz
    Successfully remade target file `/home/rory/git/notmuch/man/man1/notmuch-tag.1.gz'.
    Considering target file `/home/rory/git/notmuch/man/man5/notmuch-hooks.5.gz'.
     File `/home/rory/git/notmuch/man/man5/notmuch-hooks.5.gz' does not exist.
     Looking for an implicit rule for `/home/rory/git/notmuch/man/man5/notmuch-hooks.5.gz'.
     Trying pattern rule with stem `notmuch-hooks.5'.
     Trying implicit prerequisite `/home/rory/git/notmuch/man/man5/notmuch-hooks.5'.
     Found an implicit rule for `/home/rory/git/notmuch/man/man5/notmuch-hooks.5.gz'.
[many lines omitted]
    Must remake target `/home/rory/git/notmuch/man/man5/notmuch-hooks.5.gz'.
gzip --stdout /home/rory/git/notmuch/man/man5/notmuch-hooks.5 > /home/rory/git/notmuch/man/man5/notmuch-hooks.5.gz

The successful build of notmuch-tag.1.gz is *different* -- on master
VPATH is used, while with my patch it is not.

The rules for man1, man5 and man7 certainly look similar, so it's not
clear why the man1 entries work.  Perhaps this fragment at the top of
man/Makefile.local is there for a similar reason?

  # this variable seems to be needed to prevent lazy evaluation causing
  # problems with $(dir) changing values.
  MAIN_PAGE := $(dir)/man1/notmuch.1

I see the gzipped man files end up in the source tree; I guess ideally
they'd be in the build tree?

Regards,

Rory

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

* Re: [PATCH] man/Makefile.local: allow out-of-tree 'make install'.
  2013-08-04 12:36   ` Rory Yorke
@ 2013-09-01 13:45     ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2013-09-01 13:45 UTC (permalink / raw)
  To: Rory Yorke, Tomi Ollila, notmuch

On Sun, 04 Aug 2013, Rory Yorke <rory.yorke@gmail.com> wrote:
> I see the gzipped man files end up in the source tree; I guess ideally
> they'd be in the build tree?

Yes; the main point of out-of-tree builds and installs is not to touch
the source tree. While I don't have a fix to offer to solve the problem,
I'm afraid your patch isn't the fix either.

BR,
Jani.

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

end of thread, other threads:[~2013-09-01 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-03  9:36 [PATCH] man/Makefile.local: allow out-of-tree 'make install' Rory Yorke
2013-08-03 21:12 ` Tomi Ollila
2013-08-04 12:36   ` Rory Yorke
2013-09-01 13:45     ` Jani Nikula

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