diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index da19e950c92..623e7363ee7 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -3,6 +3,8 @@ # Copyright(c) 2019 Intel Corporation # +import filecmp +import shutil import sys import os from os.path import join @@ -30,4 +32,12 @@ with open(join(dst, '.html.d'), 'w') as d: d.write('html: ' + ' '.join(srcfiles) + '\n') +# copy custom CSS file +css = 'custom.css' +src_css = join(src, css) +dst_css = join(dst, 'html', '_static', 'css', css) +if not os.path.exists(dst_css) or not filecmp.cmp(src_css, dst_css): + os.makedirs(os.path.dirname(dst_css), exist_ok=True) + shutil.copyfile(src_css, dst_css) + sys.exit(process.returncode) diff --git a/doc/guides/meson.build b/doc/guides/meson.build index 51f81da2e37..f8bbfba9f5b 100644 --- a/doc/guides/meson.build +++ b/doc/guides/meson.build @@ -24,7 +24,5 @@ html_guides = custom_target('html_guides', install: get_option('enable_docs'), install_dir: htmldir) -install_data(files('custom.css'), install_dir: join_paths(htmldir,'_static', 'css')) - doc_targets += html_guides doc_target_names += 'HTML_Guides'