2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-12-26 02:55:45 +01:00
waf/playground/doxy/wscript
Daniel Vollmer b1a606c8e6
Generate doxygen into a sub-folder of build
When no OUTPUT_DIRECTORY was set for doxygen, then the parent
directory of the doxyfile was used. If the doxyfile is in the
root-directory, then this was the build-directory itself, which
led to the complete build-directory (including all other build
artifacts) to be installed.

The OUTPUT_DIRECTORY set (if not given) now includes the name
of the doxyfile itself (+ suffix '.doxy').

The install of doxygen-generated files also did not preserve
the directory structure.

The doxy playground example was simplified and updated, as
separate installation is no longer needed.

Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>
2015-03-05 15:14:22 +01:00

48 lines
1.0 KiB
Python

#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2008-2012 (ita)
from waflib import Build, TaskGen
VERSION='0.0.1'
APPNAME='cc_test'
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_cxx')
def configure(conf):
conf.load('compiler_cxx doxygen')
if not conf.env.DOXYGEN:
conf.fatal('doxygen is required, install it')
# NOTES:
#
# 1. The test.conf file has "OUTPUT_DIRECTORY" commented
#
# 2. Doxygen parameters may be passed using pars attribute
# e.g. pars={'EXCLUDE_PATTERNS': '*.foo'}
#
# 3. if you want to build the docs in another command, use something like:
# if bld.cmd == 'doxy': in the build
#
def build(bld):
# if the documentation is to packed, simply set doxy_tar to the filename
bld(
features='doxygen',
doxyfile='test.conf',
install_path='${PREFIX}/doc')
# and additional targets
bld(features='cxx cxxshlib', source='subdir/c.cpp', target='somelib')
# example for the NOTES point #3
from waflib import Build
class doxy(Build.BuildContext):
fun = 'build'
cmd = 'doxy'