Commit ff15bfd9 authored by Peter Hutterer's avatar Peter Hutterer

doc: drop the git version into the documentation

The libinput/doc/latest is now built automatically from git, so it's good to
have a reference to show which commit it was being built from. Add a section
to the readme with git commit information that is replaced by meson.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent d2cd727c
Pipeline #2018 passed with stages
in 9 minutes and 36 seconds
......@@ -90,3 +90,8 @@ libinput is licensed under the MIT license.
See the [COPYING](https://gitlab.freedesktop.org/libinput/libinput/tree/master/COPYING)
file for the full license information.
About
-----
Documentation generated by from git commit [__GIT_VERSION__](https://gitlab.freedesktop.org/libinput/libinput/commit/__GIT_VERSION__)
......@@ -28,4 +28,4 @@ HTML_FOOTER = "@top_srcdir@/doc/style/footer.html"
HTML_EXTRA_STYLESHEET = "@top_srcdir@/doc/style/bootstrap.css" \
"@top_srcdir@/doc/style/customdoxygen.css" \
"@top_srcdir@/doc/style/libinputdoxygen.css"
USE_MDFILE_AS_MAINPAGE = "@top_srcdir@/README.md"
USE_MDFILE_AS_MAINPAGE = @README_MD@
......@@ -340,6 +340,12 @@ if get_option('documentation')
error('Graphviz dot needs to be at least version 2.26 (have @0@)'.format(dot_version))
endif
readme = vcs_tag(command : ['git', 'log', '-1', '--format=%h'],
fallback : 'unknown',
input : 'README.md',
output : 'README.md',
replace_string: '__GIT_VERSION__')
src_doxygen = files(
# source files
'src/libinput.h',
......@@ -417,7 +423,6 @@ if get_option('documentation')
'doc/style/customdoxygen.css',
'doc/style/bootstrap.css',
'doc/style/libinputdoxygen.css',
'README.md'
)
# doxygen expects a space-separated list of input files in its
......@@ -428,18 +433,22 @@ if get_option('documentation')
doxy_input_files += [join_paths(meson.source_root(), '@0@'.format(f))]
endforeach
doxy_input_files += [readme.full_path()]
doc_config = configuration_data()
doc_config.set('PACKAGE_NAME', meson.project_name())
doc_config.set('PACKAGE_VERSION', meson.project_version())
doc_config.set('top_srcdir', meson.source_root())
doc_config.set('INPUT', ' '.join(doxy_input_files))
doc_config.set('README_MD', readme.full_path())
doxyfile = configure_file(input : 'doc/libinput.doxygen.in',
output : 'libinput.doxygen',
configuration : doc_config,
install : false)
custom_target('doxygen',
input : [ doxyfile ] + src_doxygen,
input : [ doxyfile, readme ] + src_doxygen,
output : [ 'Documentation' ],
command : [ doxygen, doxyfile ],
install : false,
......
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