build: only try to build .rsti files if we have emacs and sphinx
authorDavid Bremner <david@tethera.net>
Sun, 21 Apr 2019 23:36:43 +0000 (20:36 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 24 Apr 2019 09:53:13 +0000 (06:53 -0300)
Emacs is needed to build them, and sphinx is needed to use them

emacs/Makefile.local

index 04913a06bf61387204d8bbd00feb88ddd25fa072..40b7c14fff280e84bcaae09fd706aab4afa6ba6d 100644 (file)
@@ -47,8 +47,13 @@ emacs_images := \
 emacs_bytecode = $(emacs_sources:.el=.elc)
 emacs_docstrings = $(emacs_sources:.el=.rsti)
 
+ifneq ($(HAVE_SPHINX)$(HAVE_EMACS),11)
+docstring.stamp:
+       @echo "Missing prerequisites, not collecting docstrings"
+else
 docstring.stamp: ${emacs_docstrings}
        touch $@
+endif
 
 # Because of defmacro's and defsubst's, we have to account for load
 # dependencies between Elisp files when byte compiling.  Otherwise,