From: Samuel Martin Date: Thu, 5 Dec 2013 19:11:09 +0000 (+0100) Subject: manual: fix manual generation in preparation for BR2_EXTERNAL support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=edeb7d53978f20acc2306b71bc818e81298a68b3;p=buildroot.git manual: fix manual generation in preparation for BR2_EXTERNAL support This patch fixes an issue that occurs during the manual build process which will occur when BR2_EXTERNAL is introduced. During the package list generation, the python script using kconfiglib module reads and parses the Config.in files. So, symbols, including environment variables, got expanded and/or resolved. In kconfiglib.py, this patch fixes the regex that did not allow to use numbers in the environment variable names, so '$BR2_EXTERNAL' got wrongly expanded like it was '${BR}2_EXTERNAL': >>> Updating the manual lists... Traceback (most recent call last): File "/opt/buildroot/master/support/scripts/gen-manual-lists.py", line 375, in buildroot = Buildroot() File "/opt/buildroot/master/support/scripts/gen-manual-lists.py", line 216, in __init__ self.root_config)) File "/opt/buildroot/master/support/scripts/kconfiglib.py", line 214, in __init__ self.top_block = self._parse_file(filename, None, None, None) File "/opt/src/buildroot/master/support/scripts/kconfiglib.py", line 919, in _parse_file return self._parse_block(line_feeder, None, parent, deps, visible_if_deps, res) File "/opt/buildroot/master/support/scripts/kconfiglib.py", line 1114, in _parse_block self.base_dir)) IOError: /opt/buildroot/master/Config.in:490: sourced file "$BR2_EXTERNAL/Config.in" (expands to "2_EXTERNAL/Config.in") not found. Perhaps base_dir (argument to Config.__init__(), currently "/opt/buildroot/master") is set to the wrong value. docs/manual/manual.mk:2: recipe for target 'manual-update-lists' failed make: *** [manual-update-lists] Error 1 Reported-by: Ryan Barnett Signed-off-by: Samuel Martin Signed-off-by: Thomas Petazzoni Reviewed-by: "Yann E. MORIN" Tested-by: "Yann E. MORIN" Acked-by: Ryan Barnett Signed-off-by: Peter Korsgaard --- diff --git a/support/scripts/kconfiglib.py b/support/scripts/kconfiglib.py index 0704cc0573..e40947ce21 100644 --- a/support/scripts/kconfiglib.py +++ b/support/scripts/kconfiglib.py @@ -2074,7 +2074,7 @@ set_re = re.compile(r"CONFIG_(\w+)=(.*)") unset_re = re.compile(r"# CONFIG_(\w+) is not set") # Regular expression for finding $-references to symbols in strings -sym_ref_re = re.compile(r"\$[A-Za-z_]+") +sym_ref_re = re.compile(r"\$[A-Za-z_][0-9A-Za-z_]*") # Integers representing symbol types UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(0, 6)