From 9863296a53d426a0521d0e1ca68126785a229894 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Thu, 4 Apr 2019 18:56:19 -0700 Subject: [PATCH] docs: Allow make to be run in other directories. Signed-off-by: Tim 'mithro' Ansell --- docs/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 7f638e50..53ab46d0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,6 +1,8 @@ # Minimal makefile for Sphinx documentation # +MAKEDIR := $(dir $(lastword $(MAKEFILE_LIST))) + # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build @@ -20,8 +22,8 @@ livehtml: # Update fuzzer / minitest markdown links. fuzzers-links: - @cd db_dev_process/fuzzers; rm -f *.md - @cd db_dev_process/fuzzers; \ + @cd $(MAKEDIR)/db_dev_process/fuzzers && rm -f *.md + @cd $(MAKEDIR)/db_dev_process/fuzzers && \ for i in ../../../fuzzers/*; do \ n=$$(basename $$i | sed -e's/^[0-9][0-9][0-9]-//'); \ if [ ! -d $$i ]; then \ @@ -39,8 +41,8 @@ fuzzers-links: done minitests-links: - @cd db_dev_process/minitests; rm -f *.md - @cd db_dev_process/minitests; \ + @cd $(MAKEDIR)/db_dev_process/minitests && rm -f *.md + @cd $(MAKEDIR)/db_dev_process/minitests && \ for i in ../../../minitests/*; do \ n=$$(basename $$i | sed -e's/^[0-9][0-9][0-9]-//'); \ if [ ! -d $$i ]; then \