aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-09-29 18:49:04 +0000
committerlloyd <[email protected]>2009-09-29 18:49:04 +0000
commit1b976618fa6098b0e45de59135bdb91ced1c0bd4 (patch)
treef30210c6a2bc24813588ca481da1332ea864f2ce
parent093f98e42a3ba6d51a6c676070090dd06cc39bc7 (diff)
New logic for reading info.txt files - if no <add> block was given, then
simply add all .cpp and .h files in the directory.
-rwxr-xr-xconfigure.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 5c8835a95..8e98b7e6a 100755
--- a/configure.py
+++ b/configure.py
@@ -336,13 +336,20 @@ class ModuleInfo(object):
lex_me_harder(infofile, self,
['add', 'requires', 'os', 'arch', 'cc', 'libs'],
{ 'realname': '<UNKNOWN>',
- 'load_on': 'request',
+ 'load_on': 'auto',
'define': None,
'modset': None,
'uses_tr1': 'false',
'note': '',
'mp_bits': 0 })
+ if self.add == []:
+ for (dirpath, dirnames, filenames) in os.walk(self.lives_in):
+ if dirpath == self.lives_in:
+ self.add = [filename for filename in filenames
+ if filename.endswith('.cpp') or
+ filename.endswith('.h')]
+
# Coerce to more useful types
self.libs = force_to_dict(self.libs)