mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-29 14:50:08 +01:00
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 <peter.hutterer@who-t.net>
This commit is contained in:
parent
d2cd727c9b
commit
ff15bfd99f
3 changed files with 17 additions and 3 deletions
|
|
@ -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@
|
||||
|
|
|
|||
13
meson.build
13
meson.build
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue