diff --git a/playground/doxy/wscript b/playground/doxy/wscript index e227792b..7ed4ffcc 100644 --- a/playground/doxy/wscript +++ b/playground/doxy/wscript @@ -30,20 +30,11 @@ def configure(conf): # def build(bld): + # if the documentation is to packed, simply set doxy_tar to the filename bld( features='doxygen', doxyfile='test.conf', - doxy_tar='docs.tar.bz2') - - # if the documentation is to be installed - bld.add_group() - bld.post_mode = Build.POST_LAZY - bld(features='special_doxygen_stuff') - - @TaskGen.feature('special_doxygen_stuff') - def special_doxygen_stuff(self): - node = self.path.get_bld().make_node('html') - self.bld.install_files('${PREFIX}/doc/html', node.ant_glob('**', remove=False)) + install_path='${PREFIX}/doc') # and additional targets bld(features='cxx cxxshlib', source='subdir/c.cpp', target='somelib') diff --git a/waflib/extras/doxygen.py b/waflib/extras/doxygen.py index 7f30b2c9..acd4398d 100644 --- a/waflib/extras/doxygen.py +++ b/waflib/extras/doxygen.py @@ -8,6 +8,9 @@ Doxygen support Variables passed to bld(): * doxyfile -- the Doxyfile to use +* doxy_tar -- destination archive for generated documentation (if desired) +* install_path -- where to install the documentation +* pars -- dictionary overriding doxygen configuration settings When using this tool, the wscript will look like: @@ -79,12 +82,11 @@ class doxygen(Task.Task): if self.pars.get('OUTPUT_DIRECTORY'): # Use the path parsed from the Doxyfile as an absolute path output_node = self.inputs[0].parent.get_bld().make_node(self.pars['OUTPUT_DIRECTORY']) - output_node.mkdir() - self.pars['OUTPUT_DIRECTORY'] = output_node.abspath() else: - # If no OUTPUT_PATH was specified in the Doxyfile build path from where the Doxyfile lives - self.inputs[0].parent.get_bld().mkdir() - self.pars['OUTPUT_DIRECTORY'] = self.inputs[0].parent.get_bld().abspath() + # If no OUTPUT_PATH was specified in the Doxyfile, build path from the Doxyfile name + '.doxy' + output_node = self.inputs[0].parent.get_bld().make_node(self.inputs[0].name + '.doxy') + output_node.mkdir() + self.pars['OUTPUT_DIRECTORY'] = output_node.abspath() # Override with any parameters passed to the task generator if getattr(self.generator, 'pars', None): @@ -149,7 +151,9 @@ class doxygen(Task.Task): if not getattr(self.generator, 'doxy_tar', None): self.generator.bld.install_files(self.generator.install_path, self.outputs, - postpone=False) + postpone=False, + cwd=self.output_dir, + relative_trick=True) return Task.Task.post_run(self) class tar(Task.Task):