2007-11-10 10:20:46 -08:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
#
|
|
|
|
# Copyright (C) 2007 Richard Hughes <richard@hughsie.com>
|
|
|
|
#
|
|
|
|
# Licensed under the GNU General Public License Version 2
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
2007-11-11 03:39:57 -08:00
|
|
|
import Utils
|
2007-11-23 15:35:30 -08:00
|
|
|
import Common
|
2007-11-11 03:39:57 -08:00
|
|
|
|
2007-11-11 09:24:30 -08:00
|
|
|
#install to a versioned doc folder
|
|
|
|
doc_subdir = os.path.join('doc', Utils.g_module.APPNAME+'-'+Utils.g_module.VERSION)
|
2007-11-23 15:35:30 -08:00
|
|
|
Common.install_files('DATADIR', doc_subdir, 'pk-reference.html')
|
|
|
|
Common.install_files('DATADIR', doc_subdir, 'pk-structure.png')
|
|
|
|
Common.install_files('DATADIR', doc_subdir, 'docbook.css')
|
2007-11-10 10:20:46 -08:00
|
|
|
|
2007-11-11 04:45:21 -08:00
|
|
|
# xmlto html-nochunks -m config.xsl pk-reference.xml
|
2007-11-12 14:50:59 -08:00
|
|
|
env = bld.env()
|
|
|
|
if env['DOCBOOK_DOCS_ENABLED']:
|
|
|
|
cmd = bld.create_obj('command-output')
|
|
|
|
cmd.hidden_outputs = 'pk-reference.html'
|
|
|
|
cmd.command = 'xmlto'
|
|
|
|
cmd.command_is_external = True
|
|
|
|
cmd.cwd = cmd.input_dir('.') # xmlto is stupid, doesn't work from outside the xml source dir :(
|
|
|
|
cmd.argv = ['html-nochunks', '-m', cmd.input_file('config.xsl'),
|
|
|
|
'--searchpath', cmd.input_dir('.'), '-o', cmd.output_dir('.'),
|
|
|
|
cmd.input_file('pk-reference.xml')]
|