2011-09-10 11:13:51 +02:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
2012-12-09 05:14:42 +01:00
|
|
|
# Thomas Nagy, 2008-2012 (ita)
|
|
|
|
|
|
|
|
from waflib import Build, TaskGen
|
2011-09-10 11:13:51 +02:00
|
|
|
|
|
|
|
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')
|
2013-11-07 23:11:57 +01:00
|
|
|
if not conf.env.DOXYGEN:
|
|
|
|
conf.fatal('doxygen is required, install it')
|
2011-09-10 11:13:51 +02:00
|
|
|
|
2012-12-09 05:14:42 +01:00
|
|
|
# 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
|
|
|
|
#
|
2011-11-23 08:32:24 +01:00
|
|
|
|
2012-12-09 05:14:42 +01:00
|
|
|
def build(bld):
|
|
|
|
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')
|
2012-12-16 16:58:55 +01:00
|
|
|
self.bld.install_files('${PREFIX}/doc/html', node.ant_glob('**', remove=False))
|
2012-12-09 05:14:42 +01:00
|
|
|
|
2012-12-22 17:42:54 +01:00
|
|
|
# and additional targets
|
|
|
|
bld(features='cxx cxxshlib', source='subdir/c.cpp', target='somelib')
|
|
|
|
|
2012-12-09 05:14:42 +01:00
|
|
|
# example for the NOTES point #3
|
2011-11-23 08:32:24 +01:00
|
|
|
from waflib import Build
|
|
|
|
class doxy(Build.BuildContext):
|
|
|
|
fun = 'build'
|
|
|
|
cmd = 'doxy'
|
2011-09-10 11:13:51 +02:00
|
|
|
|