Update 'geanyfunctions.h' when using Waf.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3342 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-12-07 19:12:43 +00:00
parent 5394a14f4f
commit cc04ba744b
2 changed files with 29 additions and 0 deletions

View File

@ -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>

27
wscript
View File

@ -39,6 +39,7 @@ Requires WAF 1.5 (SVN r4695 or later) and Python 2.4 (or later).
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 @@ def build(bld):
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 @@ def print_message(conf, msg, result, color = 'GREEN'):
conf.check_message_1(msg)
conf.check_message_2(result, color)
# this is necessary for the 'geanyfunctions.h' task
@taskgen
@feature('*')
@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, []))