diff --git a/README.md b/README.md index f5024c22..2d669812 100644 --- a/README.md +++ b/README.md @@ -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__) diff --git a/doc/libinput.doxygen.in b/doc/libinput.doxygen.in index db39ea04..0599df90 100644 --- a/doc/libinput.doxygen.in +++ b/doc/libinput.doxygen.in @@ -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@ diff --git a/meson.build b/meson.build index c41a59a1..74aa2d3a 100644 --- a/meson.build +++ b/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,