SF.net SVN: geany:[3342] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Dec 7 19:12:43 UTC 2008


Revision: 3342
          http://geany.svn.sourceforge.net/geany/?rev=3342&view=rev
Author:   eht16
Date:     2008-12-07 19:12:43 +0000 (Sun, 07 Dec 2008)

Log Message:
-----------
Update 'geanyfunctions.h' when using Waf.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/wscript

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-12-07 19:12:27 UTC (rev 3341)
+++ trunk/ChangeLog	2008-12-07 19:12:43 UTC (rev 3342)
@@ -17,6 +17,8 @@
    When using the focus path entry and file list keyboard shortcuts,
    make sure the filebrowser tab is the current notebook tab in the
    sidebar (closes #2402290).
+ * wscript:
+   Update 'geanyfunctions.h' when using Waf.
 
 
 2008-12-06  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/wscript
===================================================================
--- trunk/wscript	2008-12-07 19:12:27 UTC (rev 3341)
+++ trunk/wscript	2008-12-07 19:12:43 UTC (rev 3342)
@@ -39,6 +39,7 @@
 
 
 import Build, Configure, Options, Runner, Task, Utils
+from TaskGen import feature, before, taskgen
 import sys, os, subprocess, shutil
 from distutils import version
 
@@ -301,6 +302,10 @@
 	obj.uselib	   = 'GTK'
 	obj.uselib_local = 'scintilla tagmanager'
 
+	# geanyfunctions.h
+	bld.new_task_gen(source='plugins/genapi.py src/plugins.c', name='PluginAPI',
+		rule='cd ${SRC[0].parent.abspath()} && python genapi.py -q', before='cc')
+
 	# Plugins
 	if bld.env['HAVE_PLUGINS'] == 1:
 		build_plugin('classbuilder')
@@ -477,3 +482,25 @@
 	conf.check_message_1(msg)
 	conf.check_message_2(result, color)
 
+
+# this is necessary for the 'geanyfunctions.h' task
+ at taskgen
+ at feature('*')
+ at before('apply_core')
+def exec_rule(self):
+	if not getattr(self, 'rule', None):
+		return
+	name = self.target
+	cls = Task.simple_task_type(name, self.rule)
+
+	tsk = self.create_task(name)
+	tsk.inputs=[self.path.find_resource(x) for x in self.to_list(self.source)]
+	if getattr(self, 'target', None):
+		tsk.outputs=[self.path.find_or_declare(x) for x in self.to_list(self.target)]
+	else:
+		cls.quiet = True
+	for x in ['after', 'before']:
+		setattr(cls, x, getattr(self, x, []))
+
+
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list