From e869769b3c2634edb9d14c89b6c6710c7b44ddfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Sun, 12 Apr 2015 00:26:34 +0200 Subject: [PATCH] add the --htmldir option and install HTML docs into it if given --- wscript | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index ffc741ab..e1ffd641 100644 --- a/wscript +++ b/wscript @@ -406,6 +406,7 @@ def options(opt): opt.tool_options('compiler_cc') # install directories + opt.add_option('--htmldir', type='string', default=None, help="HTML documentation directory [Default: /share/jack-audio-connection-kit/reference/html/") opt.add_option('--libdir', type='string', help="Library directory [Default: /lib]") opt.add_option('--libdir32', type='string', help="32bit Library directory [Default: /lib32]") opt.add_option('--mandir', type='string', help="Manpage directory [Default: /share/man/man1]") @@ -546,6 +547,13 @@ def configure(conf): conf.env['BINDIR'] = conf.env['PREFIX'] + '/bin' + if Options.options.htmldir: + conf.env['HTMLDIR'] = Options.options.htmldir + else: + # set to None here so that the doxygen code can find out the highest + # directory to remove upon install + conf.env['HTMLDIR'] = None + if Options.options.libdir: conf.env['LIBDIR'] = Options.options.libdir else: @@ -765,8 +773,17 @@ def build(bld): target = 'doxygen.log' ) - share_dir = bld.options.destdir + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' - html_install_dir = share_dir + '/reference/html/' + # Determine where to install HTML documentation. Since share_dir is the + # highest directory the uninstall routine should remove, there is no + # better candidate for share_dir, but the requested HTML directory if + # --htmldir is given. + if bld.env['HTMLDIR']: + html_install_dir = bld.options.destdir + bld.env['HTMLDIR'] + share_dir = html_install_dir + else: + share_dir = bld.options.destdir + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' + html_install_dir = share_dir + '/reference/html/' + if bld.cmd == 'install': if os.path.isdir(html_install_dir): Logs.pprint('CYAN', "Removing old doxygen documentation installation...")