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
This commit is contained in:
Nedko Arnaudov 2021-02-22 02:54:51 +02:00
parent d577c94fce
commit 9adeffb011
1 changed files with 7 additions and 1 deletions

View File

@ -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: