[ekg2-commit] r4262 - trunk: trunk/SConstruct

SVN commit svn w toxygen.net
Sob, 9 Sie 2008, 22:29:49 CEST


Author: peres
Date: 2008-08-09 22:29:49 +0200 (Sat, 09 Aug 2008)
New Revision: 4262

Modified:
   trunk/SConstruct
Log:

Ensure scons 0.98, always pass 'env' to scons.d/ and print optional plugin deps.



Modified: trunk/SConstruct
===================================================================
--- trunk/SConstruct	2008-08-09 20:02:32 UTC (rev 4261)
+++ trunk/SConstruct	2008-08-09 20:29:49 UTC (rev 4262)
@@ -2,9 +2,9 @@
 # vim:set fileencoding=utf-8
 #  Alternate build system for EKG2, unstable and unfinished yet
 #  (C) 2008 Michał Górny
-#
-#  configure.ac ported to: idn
 
+EnsureSConsVersion(0, 98)
+
 consts = {
 	'VERSION': 'SVN'
 	}
@@ -61,7 +61,7 @@
 def ExtTest(name, addexports = []):
 	if name in ExtTestsCache.keys():
 		return ExtTestsCache[name]
-	exports = ['conf', 'defines']
+	exports = ['conf', 'defines', 'env']
 	exports.extend(addexports)
 	ret = SConscript('scons.d/%s' % (name), exports)
 	ExtTestsCache[name] = ret
@@ -96,7 +96,7 @@
 ekg_libs = []
 
 ExtTest('standard', ['ekg_libs'])
-ExtTest('compat', ['ekg_libs', 'env'])
+ExtTest('compat', ['ekg_libs'])
 
 plugin_def = {
 	'type':			'misc',
@@ -149,9 +149,15 @@
 	if 'fail' in info:
 		del plugins[plugin]
 		continue
+
+	optdeps = []
 	for dep in info['optdepends']:
-		if not ExtTest(dep, ['libs']):
+		have_it = ExtTest(dep, ['libs'])
+		if not have_it:
 			print '[%s] Optional dependency not satisfied: %s' % (plugin, dep)
+			optdeps.append('-%s' % (dep))
+		else:
+			optdeps.append('%s' % (dep))
 
 	plugins[plugin] = {
 		'libs':	libs
@@ -160,8 +166,15 @@
 	type = info['type']
 	if not pl.has_key(type):
 		pl[type] = []
-	pl[type].append('%s%s' % (plugin_symbols[plugin_states.index(info['state'])], plugin))
 
+	if optdeps:
+		optdeps = ' [%s]' % (' '.join(optdeps))
+	else:
+		optdeps = ''
+
+	pl[type].append('%s%s%s' % (plugin_symbols[plugin_states.index(info['state'])], plugin, optdeps))
+
+print
 if pl:
 	print 'Enabled plugins:'
 	for type, plugs in pl.items():



Więcej informacji o liście dyskusyjnej ekg2-commit