Bug: Attempt to install notmuch-emacs.info during --without-emacs build

2019-06-09 Thread Ralph Seichter
MacPorts CI builds report the following [1]:


DEBUG: system:  cd 
"/opt/local/var/macports/build/_Users_vsts_agent_2.152.1_work_1_s_mail_notmuch/notmuch/work/notmuch-0.29"
 && ./configure --prefix=/opt/local --with-docs --without-emacs --without-ruby
[...]
Checking if emacs (>= 24) is available... No (so will not byte-compile emacs 
code)
[...]
/opt/local/var/macports/build/_Users_vsts_agent_2.152.1_work_1_s_mail_notmuch/notmuch/work/notmuch-0.29/doc/index.rst:7:
 WARNING: toctree contains reference to excluded document 'notmuch-emacs'
WARNING: "texinfo_documents" config value references unknown document 
notmuch-emacs
[...]
install -m0644 doc/_build/texinfo/notmuch-address.info 
doc/_build/texinfo/notmuch-compact.info doc/_build/texinfo/notmuch-config.info 
doc/_build/texinfo/notmuch-count.info doc/_build/texinfo/notmuch-dump.info 
doc/_build/texinfo/notmuch-emacs-mua.info 
doc/_build/texinfo/notmuch-insert.info doc/_build/texinfo/notmuch-new.info 
doc/_build/texinfo/notmuch-reindex.info doc/_build/texinfo/notmuch-reply.info 
doc/_build/texinfo/notmuch-restore.info doc/_build/texinfo/notmuch-search.info 
doc/_build/texinfo/notmuch-show.info doc/_build/texinfo/notmuch-tag.info 
doc/_build/texinfo/notmuch.info doc/_build/texinfo/notmuch-hooks.info 
doc/_build/texinfo/notmuch-properties.info 
doc/_build/texinfo/notmuch-search-terms.info 
doc/_build/texinfo/notmuch-emacs.info 
/opt/local/var/macports/build/_Users_vsts_agent_2.152.1_work_1_s_mail_notmuch/notmuch/work/destroot/opt/local/share/info
install: doc/_build/texinfo/notmuch-emacs.info: No such file or directory
make: *** [install-info] Error 71


Why is the build trying to install texinfo/notmuch-emacs.info even
though --without-emacs was specified during configuration and Emacs was
not found during the sanity checks?

[1] Full build log available at https://paste.z0k.xyz/8352cabdee6f.txt

-Ralph
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug: Attempt to install notmuch-emacs.info during --without-emacs build

2019-06-09 Thread David Bremner
Ralph Seichter  writes:

>
> Why is the build trying to install texinfo/notmuch-emacs.info even
> though --without-emacs was specified during configuration and Emacs was
> not found during the sanity checks?

Agreed, that looks like a bug.  Apprently the combination of having
makeinfo but not emacs is not well tested.

The following seems to fix the problem, but I haven't tested it extensively.

diff --git a/doc/Makefile.local b/doc/Makefile.local
index 719172fe..55ff4a64 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -28,7 +28,10 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
 MAN1_TEXI := $(patsubst 
$(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST))
 MAN5_TEXI := $(patsubst 
$(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST))
 MAN7_TEXI := $(patsubst 
$(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST))
-INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) 
$(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI)
+ifeq ($(WITH_EMACS),1)
+   $(INFO_TEXI_FILES):= $(INFO_TEXI_FILES) 
$(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+endif
 INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
 
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug: Attempt to install notmuch-emacs.info during --without-emacs build

2019-06-09 Thread Ralph Seichter
* David Bremner:

> The following seems to fix the problem, but I haven't tested it
> extensively.

As shown in https://monksofcool.net/tmp/6bmjUFL.log , your suggestion
results in notmuch-emacs.info being generated but unfortunately not
installed when Notmuch is built --with-emacs. Obviously that's better
than a build failure for --without-emacs, but it is not quite ideal
either. ;-)

-Ralph
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug: Attempt to install notmuch-emacs.info during --without-emacs build

2019-06-09 Thread David Bremner
Ralph Seichter  writes:

> * David Bremner:
>
>> The following seems to fix the problem, but I haven't tested it
>> extensively.
>
> As shown in https://monksofcool.net/tmp/6bmjUFL.log , your suggestion
> results in notmuch-emacs.info being generated but unfortunately not
> installed when Notmuch is built --with-emacs. Obviously that's better
> than a build failure for --without-emacs, but it is not quite ideal
> either. ;-)
>

Attempt #2; we need to delay expansion of INFO_TEXI_FILES until
WITH_EMACS is defined.

diff --git a/doc/Makefile.local b/doc/Makefile.local
index 719172fe..5b99dd02 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -28,7 +28,9 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
 MAN1_TEXI := $(patsubst 
$(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST))
 MAN5_TEXI := $(patsubst 
$(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST))
 MAN7_TEXI := $(patsubst 
$(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST))
-INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) 
$(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+INFO_TEXI_FILES = $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) \
+   $(if $(filter 1,$(WITH_EMACS)), 
$(DOCBUILDDIR)/texinfo/notmuch-emacs.texi,)
+
 INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
 
 .PHONY: sphinx-html sphinx-texinfo sphinx-info
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug: Attempt to install notmuch-emacs.info during --without-emacs build

2019-06-09 Thread Ralph Seichter
* David Bremner:

> Attempt #2; we need to delay expansion of INFO_TEXI_FILES until
> WITH_EMACS is defined.

Works nicely for my local builds. Now I need to wait for the CI builds
to run.

-Ralph
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug: Attempt to install notmuch-emacs.info during --without-emacs build

2019-06-09 Thread Ralph Seichter
MacPorts CI builds were successful as well. Thank you for the prompt
fix, David.

-Ralph
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch