docs: load_config.py: ensure subdirs end with "/"
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 18 Jul 2019 19:13:48 +0000 (16:13 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 19 Jul 2019 11:49:27 +0000 (08:49 -0300)
The logic with seeks for a subdir passed via SPHINXDIRS is
incomplete: if one uses something like:

make SPHINXDIRS=arm pdfdocs

It will find both "arm" and "arm64" directories. Worse than
that, it will convert "arm64/index" to "4/index".

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Documentation/sphinx/load_config.py

index 101e6f0..eeb394b 100644 (file)
@@ -35,7 +35,7 @@ def loadConfig(namespace):
             latex_documents = namespace['latex_documents']
 
             for l in latex_documents:
-                if l[0].find(dir) == 0:
+                if l[0].find(dir + '/') == 0:
                     has = True
                     fn = l[0][len(dir) + 1:]
                     new_latex_docs.append((fn, l[1], l[2], l[3], l[4]))