aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scanfiles.py')
-rw-r--r--scanfiles.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/scanfiles.py b/scanfiles.py
index fc701f6..b961037 100644
--- a/scanfiles.py
+++ b/scanfiles.py
@@ -109,17 +109,21 @@ def scanautotoolsdeps(acfile,amfile):
else:
useargs[usearg] = [src]
+ ifdef_lst = [includes[2]]
+
for usearg in useargs:
useargs[usearg] = scanfilelist(useargs[usearg],src_incflag)
-
- for ifdef in includes[2]:
- for switch in iflst:
- if ifdef in switch[1]:
- usearg = inter_useflag(switch[0])
- if usearg in useargs:
- useargs[usearg][0].update(includes[2][ifdef][0])
- else:
- useargs[usearg] = includes[2][ifdef]
+ ifdef_lst += [useargs[usearg][2]]
+
+ for ifdef in ifdef_lst:
+ for item in ifdef:
+ for switch in iflst:
+ if item in switch[1]:
+ usearg = inter_useflag(switch[0])
+ if usearg in useargs:
+ useargs[usearg][0].update(ifdef[item][0])
+ else:
+ useargs[usearg] = ifdef[item]
#print(useargs)
#print(includes)
return useflags,includes,useargs