From 9adeffb01181baa9102b1bd2d634a5c7dfe0b50f Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Mon, 22 Feb 2021 02:54:51 +0200 Subject: [PATCH] wscript: add --docdir option and change the default The new default is PREFIX/share/doc/ladish/ Previous value was PREFIX/share/ladish/ This matches what linux distros use --- wscript | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 02b12525..0ea49c44 100644 --- a/wscript +++ b/wscript @@ -55,6 +55,7 @@ def options(opt): opt.add_option('--distsuffix', type='string', default="", help="String to append to the distribution tarball name") opt.add_option('--tagdist', action='store_true', default=False, help='Create of git tag for distname') opt.add_option('--libdir', type='string', default=None, help='Define lib dir') + opt.add_option('--docdir', type='string', default=None, help="Define doc dir [default: PREFIX'/share/doc/" + APPNAME + ']') if parallel_debug: @@ -140,6 +141,11 @@ def configure(conf): else: conf.env['LIBDIR'] = os.path.join(os.path.normpath(conf.env['PREFIX']), 'lib') + if Options.options.docdir: + conf.env['DOCDIR'] = Options.options.docdir + else: + conf.env['DOCDIR'] = os.path.join(os.path.normpath(conf.env['PREFIX']), 'share', 'doc', APPNAME) + conf.env['BUILD_DOXYGEN_DOCS'] = Options.options.doxygen conf.check_cfg( @@ -657,7 +663,7 @@ def build(bld): bld.install_files('${DATA_DIR}', status_images) bld.install_files('${DATA_DIR}', "art/ladish-logo-128x128.png") - bld.install_files('${DATA_DIR}', ["AUTHORS", "README", "NEWS"]) + bld.install_files('${DOCDIR}', ["AUTHORS", "README", "NEWS"]) bld.install_as('${DATA_DIR}/COPYING', "gpl2.txt") if bld.env['BUILD_DOXYGEN_DOCS'] == True: