summaryrefslogtreecommitdiffstats
path: root/python/makefile.py
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2020-07-17 05:48:25 +0200
committerDavid Lamparter <equinox@diac24.net>2020-07-17 05:54:54 +0200
commit06852b5b5c7f125d0903d5f1039d18d3cdf3482e (patch)
tree6ef01a357259bdc494e04e42e4e0179ff4c4415f /python/makefile.py
parentMerge pull request #6752 from xThaid/evpn_neigh_fix (diff)
downloadfrr-06852b5b5c7f125d0903d5f1039d18d3cdf3482e.tar.xz
frr-06852b5b5c7f125d0903d5f1039d18d3cdf3482e.zip
build: fix Makefile rule redefinition
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'python/makefile.py')
-rw-r--r--python/makefile.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/makefile.py b/python/makefile.py
index 948d3f739..fe20945cc 100644
--- a/python/makefile.py
+++ b/python/makefile.py
@@ -73,11 +73,18 @@ while lines:
out_lines.append(line)
continue
- m = make_rule_re.match(line)
+ full_line = line
+ full_lines = lines[:]
+ while full_line.endswith('\\'):
+ full_line = full_line[:-1] + full_lines.pop(0)
+
+ m = make_rule_re.match(full_line)
if m is None:
out_lines.append(line)
continue
+ line, lines = full_line, full_lines
+
target, dep = m.group(1), m.group(2)
if target.endswith('.lo') or target.endswith('.o'):