Commit 0a5dc169 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

doc: use configure_file()'s @PLAINNAME@ instead of calling install



Instead of calling out to install on every ninja call, use @PLAINNAME@ as
substitution for just copying the file over. This gets around the "no
directory allowed in output file" limitation.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 37e21cee
......@@ -46,11 +46,22 @@ src_doxygen = files(
'style/libinputdoxygen.css',
)
doxyfiles = custom_target('doxyfiles',
input : src_doxygen,
output : 'doxyfiles',
command : [prg_install, '-t', '@OUTDIR@', '@INPUT@'],
build_by_default: true)
config_noop = configuration_data()
# Set a dummy replacement to silence meson warnings:
# meson.build:487: WARNING: Got an empty configuration_data() object and
# found no substitutions in the input file 'foo'. If you
# want to copy a file to the build dir, use the 'copy:'
# keyword argument added in 0.47.0
config_noop.set('dummy', 'dummy')
doxyfiles = []
foreach f : src_doxygen
df = configure_file(input: f,
output: '@PLAINNAME@',
configuration : config_noop,
install : false)
doxyfiles += [ df ]
endforeach
doc_config = configuration_data()
doc_config.set('PACKAGE_NAME', meson.project_name())
......@@ -63,9 +74,9 @@ doxyfile = configure_file(input : 'libinput.doxygen.in',
install : false)
custom_target('doxygen',
input : [ doxyfile, mainpage ] + src_doxygen,
input : [ doxyfiles, doxyfile, mainpage ] + src_doxygen,
output : [ '.' ],
command : [ doxygen, doxyfile ],
install : false,
depends: [doxyfiles, mainpage ],
depends: [ mainpage ],
build_by_default : true)
......@@ -86,7 +86,7 @@ foreach s404 : src_404s
endif
endforeach
src_extra = [
src_rst = files(
# dot drawings
'dot/seats-sketch.gv',
'dot/seats-sketch-libinput.gv',
......@@ -127,9 +127,7 @@ src_extra = [
'svg/touchscreen-gestures.svg',
'svg/trackpoint-delta-illustration.svg',
'svg/twofinger-scrolling.svg',
]
src_rst = files(
# rst files
'absolute-axes.rst',
'absolute-coordinate-ranges.rst',
'architecture.rst',
......@@ -169,19 +167,28 @@ src_rst = files(
'configuration.rst',
)
src_sphinx = custom_target('sphinx-sources',
input : [src_rst, src_extra],
output : '.',
command : [prg_install, '-t', '@OUTDIR@', '@INPUT@'],
build_by_default: true)
config_noop = configuration_data()
# Set a dummy replacement to silence meson warnings:
# meson.build:487: WARNING: Got an empty configuration_data() object and
# found no substitutions in the input file 'foo'. If you
# want to copy a file to the build dir, use the 'copy:'
# keyword argument added in 0.47.0
config_noop.set('dummy', 'dummy')
src_sphinx = []
foreach f : src_rst
sf = configure_file(input: f,
output: '@PLAINNAME@',
configuration : config_noop,
install : false)
src_sphinx += [ sf ]
endforeach
# do not use -j, it breaks on Ubuntu
sphinx_output_dir = 'Documentation'
custom_target('sphinx',
input : [ sphinx_conf_py, git_version_page ] + src_rst + src_extra + dst_404s,
input : [ sphinx_conf_py, git_version_page ] + src_sphinx + dst_404s,
output : [ sphinx_output_dir ],
command : [ sphinx, '-q', '-b', 'html',
meson.current_build_dir(), sphinx_output_dir],
depends: [ src_sphinx ],
build_by_default : true)
......@@ -2,7 +2,7 @@ project('libinput', 'c', 'cpp',
version : '1.11.901',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.40.0')
meson_version : '>= 0.41.0')
libinput_version = meson.project_version().split('.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment