Re: [PATCH] doc: Don't install emacs docs when they are not built
Tomi Ollila writes: > > Interestingly, in your commit message you mention that changing := to = > makes a difference. I would have thought that assigning INFO_INFO_FILES > with := would have expanded INFO_TEXI_FILES just 2 lines below after > its introduction. Ah. Silly me. The non-working version had the following line in it $(INFO_TEXI_FILES):= $(INFO_TEXI_FILES) $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi The reason that does have _something_ do with variable expansion, just not what I claimed ;). I think I'll go back to the ifeq version, it's more like what we use other places. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] doc: Don't install emacs docs when they are not built
On Mon, Jun 10 2019, David Bremner wrote: > In 40b025 we stopped building the notmuch-emacs documentation if > HAVE_EMACS=0 (i.e. no emacs was detected by configure). Unfortunately > we continued to try to install the (non-existent) documentation, which > causes build/install failures. > > As a bonus, we also avoid installing the documentation if the user > configures --without-emacs. > > We use '$(if )' instead of 'ifeq' here (and change ':=' to '=') to > make sure that WITH_EMACS and HAVE_EMACS are defined before we expand > INFO_TEXI_FILES. > > Thanks to Ralph Seichter for reporting the problem, and testing > previous versions of this fix. > --- > doc/Makefile.local | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/doc/Makefile.local b/doc/Makefile.local > index 719172fe..92c41b57 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 11,$(HAVE_EMACS)$(WITH_EMACS)), > $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi,) > + > INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info) Interestingly, in your commit message you mention that changing := to = makes a difference. I would have thought that assigning INFO_INFO_FILES with := would have expanded INFO_TEXI_FILES just 2 lines below after its introduction. Anyway, it if helps, good (and change LGTM). I'm just a bit curious... Tomi > > .PHONY: sphinx-html sphinx-texinfo sphinx-info > -- > 2.20.1 > > ___ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] doc: Don't install emacs docs when they are not built
In 40b025 we stopped building the notmuch-emacs documentation if HAVE_EMACS=0 (i.e. no emacs was detected by configure). Unfortunately we continued to try to install the (non-existent) documentation, which causes build/install failures. As a bonus, we also avoid installing the documentation if the user configures --without-emacs. We use '$(if )' instead of 'ifeq' here (and change ':=' to '=') to make sure that WITH_EMACS and HAVE_EMACS are defined before we expand INFO_TEXI_FILES. Thanks to Ralph Seichter for reporting the problem, and testing previous versions of this fix. --- doc/Makefile.local | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.local b/doc/Makefile.local index 719172fe..92c41b57 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 11,$(HAVE_EMACS)$(WITH_EMACS)), $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi,) + INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info) .PHONY: sphinx-html sphinx-texinfo sphinx-info -- 2.20.1 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch