From f9c8ec3a8f246507634a8017b9923c1a1c8ca53c Mon Sep 17 00:00:00 2001
From: Antoine Lambert <anlambert@softwareheritage.org>
Date: Wed, 29 Nov 2023 14:30:31 +0100
Subject: [PATCH] docs/Makefile: Fix doc build outside tox when using make
 command

When building package documentation outside tox by calling make in the
docs directory, the include of Makefile.sphinx inside the docs Makefile
was failing as its relative path was invalid.

So adapt this relative path according if the SWH_PACKAGE_DOC_TOX_BUILD
environment variable is set or not.
---
 docs/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/Makefile b/docs/Makefile
index bf867de5..ae6cc194 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,2 +1,7 @@
+ifdef SWH_PACKAGE_DOC_TOX_BUILD
 include swh-docs/Makefile.sphinx
+else
+include ../../swh-docs/Makefile.sphinx
+endif
+
 -include Makefile.local
-- 
GitLab