2008-09-07 19:48:04 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# WAF build script for midori
|
2008-10-11 05:27:52 +00:00
|
|
|
# This file is licensed under the terms of the expat license, see the file EXPAT.
|
2008-09-07 19:48:04 +00:00
|
|
|
|
|
|
|
import pproc as subprocess
|
|
|
|
|
|
|
|
for module in ('midori', 'katze'):
|
|
|
|
try:
|
|
|
|
if not os.access ('_build_', os.F_OK):
|
2009-02-19 01:07:03 +00:00
|
|
|
Utils.check_dir ('_build_')
|
2008-09-07 19:48:04 +00:00
|
|
|
if not os.access ('_build_/docs', os.F_OK):
|
2009-02-19 01:07:03 +00:00
|
|
|
Utils.check_dir ('_build_/docs')
|
2008-09-07 19:48:04 +00:00
|
|
|
if not os.access ('_build_/docs/api', os.F_OK):
|
2009-02-19 01:07:03 +00:00
|
|
|
Utils.check_dir ('_build_/docs/api')
|
2008-09-07 19:48:04 +00:00
|
|
|
subprocess.call (['gtkdoc-scan', '--module=' + module,
|
|
|
|
'--source-dir=' + module, '--output-dir=_build_/docs/api/' + module,
|
|
|
|
'--rebuild-sections', '--rebuild-types'])
|
|
|
|
os.chdir ('_build_/docs/api/' + module)
|
|
|
|
subprocess.call (['gtkdoc-mktmpl', '--module=' + module,
|
|
|
|
'--output-dir=.' + module])
|
|
|
|
subprocess.call (['gtkdoc-mkdb', '--module=' + module,
|
|
|
|
'--source-dir=.', '--output-dir=xml',
|
|
|
|
'--source-suffixes=c,h', '--output-format=xml',
|
|
|
|
'--default-includes=%s/%s.h' % (module, module),
|
|
|
|
'--sgml-mode', '--main-sgml-file=%s.sgml' % module])
|
|
|
|
if not os.access ('html', os.F_OK):
|
2009-02-19 01:07:03 +00:00
|
|
|
Utils.check_dir ('html')
|
2008-09-07 19:48:04 +00:00
|
|
|
os.chdir ('html')
|
|
|
|
subprocess.call (['gtkdoc-mkhtml', module, '../%s.sgml' % module])
|
|
|
|
Params.pprint ('YELLOW', "Created documentation for %s." % module)
|
|
|
|
os.chdir ('../../../../..')
|
|
|
|
except Exception, msg:
|
|
|
|
print msg
|
|
|
|
Params.pprint ('RED', "Failed to create documentation for %s." % module)
|