How to set a directory recursively using waf
I am currently using the following valadoc build task to generate api documentation for my vala app:
doc = bld.new_task_gen (
features = 'valadoc',
output_dir = '../doc/html',
package_name = bld.env['PACKAGE_NAME'],
package_version = bld.env['VERSION'],
packages = 'gtk+-3.0 gee-1.0 libxml-2.0 x11 gdk-x11-3.0 libpeas-gtk-1.0 libpeas-1.0 config xtst gdk-3.0',
vapi_dirs = '../vapi',
force = True)
path = bld.path.find_dir ('../src')
doc.files = path.ant_glob (incl='**/*.vala')
These tasks create an html directory in the output directory that includes several subdirectories with html and image files.
I know I'm trying to install files like this in / usr / share / doc / projectname / html /. To do this, I added the following to the wscript_build file (following the documentation I found here ):
output_dir = doc.bld.path.find_or_declare('../doc/html')
doc.outputs = output_dir.ant_glob (incl='**/*')
doc.bld.install_files('${PREFIX}/share/doc/projectname/html', doc.outputs)
However, this results in a "No node signature" error. Does anyone know how to get around this error? Or is there an easy way to set the directory recursively using waf?
A complete sample can be found here.
source to share
I had a similar problem with the generated files and had to update the signature for the corresponding Node objects. Try to create a task:
def signature_task(task):
for x in task.generator.bld.path.find_dir('../doc/html').ant_glob('**/*', remove=False):
x.sig = Utils.h_file(x.abspath())
At the beginning of the build rule, try adding:
#Support running task groups serially
bld.post_mode = Build.POST_LAZY
Then at the end of your build add:
#Previous tasks belong to a group
bld.add_group()
#This task runs last
bld(rule=signature_task, always=True, name="signature_task")
source to share