1 Description: doc: fix garbage text in generated HTML guides
2 If the user has MAKEFLAGS set in the environment when building the
3 documentation, the doc/guides/conf.py script which calls "make"
4 exclusively to get the project version might pick up garbage from
6 <title>FAQ — Data Plane Development Kit make[2]:
7 Entering directory '/build/1st/dpdk-18.11/doc/guides'
9 make[2]: Leaving directory '/build/1st/dpdk-18.11'
11 Override MAKEFLAGS in the Python subprocess call to avoid this issue.
12 Author: bluca@debian.org
13 Forwarded: https://patches.dpdk.org/patch/48544/
14 --- a/doc/guides/conf.py
15 +++ b/doc/guides/conf.py
16 @@ -9,6 +9,7 @@ from sphinx import __version__ as sphinx
17 from sphinx.highlighting import PygmentsBridge
18 from pygments.formatters.latex import LatexFormatter
19 from os import listdir
20 +from os import environ
21 from os.path import basename
22 from os.path import dirname
23 from os.path import join as path_join
24 @@ -37,7 +38,9 @@ html_add_permalinks = ""
25 html_show_copyright = False
26 highlight_language = 'none'
28 -version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'])
29 +# If MAKEFLAGS is exported by the user, garbage text might end up in version
30 +version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'],
31 + env=dict(environ, MAKEFLAGS=""))
32 version = version.decode('utf-8').rstrip()