]> granicus.if.org Git - neomutt/commitdiff
Generate neomuttrc even if configured with --disable-doc
authorPietro Cerutti <gahr@gahr.ch>
Mon, 16 Oct 2017 11:23:05 +0000 (11:23 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Oct 2017 11:30:45 +0000 (12:30 +0100)
Issue #862

doc/Makefile.autosetup

index 174a52513ee5d70283b8d567df80704eb4ca71ab..93b8b8f74b992107f3b36e0f2a2005cf3bb494c1 100644 (file)
@@ -1,7 +1,13 @@
-@if BUILD_DOC
-
 MAKEDOC_CPP = $(CPP) $(CPPFLAGS) -D_MAKEDOC -C -I.
 
+doc/neomuttrc: $(SRCDIR)/init.h doc/makedoc$(EXEEXT) $(SRCDIR)/doc/neomuttrc.head
+       sed -e 's,@docdir@,$(docdir),' $(SRCDIR)/doc/neomuttrc.head \
+           > doc/neomuttrc
+       $(MAKEDOC_CPP) $(SRCDIR)/init.h | doc/makedoc$(EXEEXT) -c \
+           >> doc/neomuttrc
+
+@if BUILD_DOC
+
 CHUNKED_DOCFILES = doc/advancedusage.html \
                   doc/configuration.html \
                   doc/gettingstarted.html \
@@ -33,12 +39,6 @@ all-doc:     $(CHUNKED_DOCFILES) \
                doc/neomuttrc.man \
                doc/neomutt-syntax.vim
 
-doc/neomuttrc: $(SRCDIR)/init.h doc/makedoc$(EXEEXT) $(SRCDIR)/doc/neomuttrc.head
-       sed -e 's,@docdir@,$(docdir),' $(SRCDIR)/doc/neomuttrc.head \
-           > doc/neomuttrc
-       $(MAKEDOC_CPP) $(SRCDIR)/init.h | doc/makedoc$(EXEEXT) -c \
-           >> doc/neomuttrc
-
 doc/manual.html:       doc/manual.xml \
                        $(SRCDIR)/doc/html.xsl \
                        $(SRCDIR)/doc/neomutt.xsl \
@@ -146,10 +146,19 @@ sortcheck-doc: doc/manual.xml
        $(RM) doc/vars.tmp.1 doc/vars.tmp.2
 
 @else
-all-doc:
+# Let's generate neomuttrc in all cases: it doesn't require any additional 3rd
+# party dependencies and distributions tend to rely on having it.
+all-doc: doc/neomuttrc
+
 clean-doc:
-install-doc:
+       $(RM) doc/neomuttrc
+
+install-doc: all-doc
+       $(MKDIR_P) $(DESTDIR)$(sysconfdir)
+       $(INSTALL) -m 644 doc/neomuttrc $(DESTDIR)$(sysconfdir)/neomuttrc
+
 uninstall-doc:
+       $(RM) $(DESTDIR)$(sysconfdir)/neomuttrc
 @endif
 
 # vim: set ts=8 noexpandtab: