[PATCH] man/Makefile.local: allow out-of-tree 'make install'.

Rory Yorke rory.yorke at gmail.com
Sun Aug 4 05:36:38 PDT 2013


Tomi Ollila <tomi.ollila at 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


More information about the notmuch mailing list