[gnome-code-assistance] [backends/c] More makefile heuristics
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-code-assistance] [backends/c] More makefile heuristics
- Date: Wed, 13 Nov 2013 09:03:16 +0000 (UTC)
commit 7a0241e6b69dccb1de6d97f8a9bf41ec7a90527c
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Wed Nov 13 10:02:58 2013 +0100
[backends/c] More makefile heuristics
backends/c/makefileintegration.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/backends/c/makefileintegration.py b/backends/c/makefileintegration.py
index 04c2ef0..4a56af3 100644
--- a/backends/c/makefileintegration.py
+++ b/backends/c/makefileintegration.py
@@ -279,14 +279,17 @@ class MakefileIntegration:
while len(lookfor) > 0:
# Make a regular expression which will match all printed targets that
# depend on the file we are looking for
+ if self.debug:
+ print(' looking for: [{0}]'.format(', '.join(lookfor)))
+
relookfor = [re.escape(x) for x in lookfor]
- reg = re.compile('^([^:\n ]+):.*({0})'.format('|'.join(relookfor)), re.M)
+ reg = re.compile('^([^:\n ]+):.*\\b({0})\\b'.format('|'.join(relookfor)), re.M)
lookfor = []
for match in reg.finditer(outstr):
target = match.group(1)
- if target[0] == '#':
+ if target[0] == '#' or target[0] == '.' or '-am' in target:
continue
if target in found:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]