Make a link to the html docs available as a #define

The "latest" documentation link is the location for the master branch,
released versions have their own directory on the server.

The micro-versions of 90 and above are used for snapshots and release
candidates, so whenever we have a micro version of >= 90 we still want to link
to the "latest" documentation. In all other cases, we link to the current
release.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2016-04-27 11:32:02 +10:00
parent 4552d686f8
commit 4fdaa1b2a9
2 changed files with 12 additions and 0 deletions

View file

@ -17,6 +17,10 @@ AC_SUBST([LIBINPUT_VERSION_MINOR], [libinput_minor_version])
AC_SUBST([LIBINPUT_VERSION_MICRO], [libinput_micro_version])
AC_SUBST([LIBINPUT_VERSION], [libinput_version])
AC_DEFINE([LIBINPUT_VERSION_MAJOR], [libinput_major_version], "libinput major version number")
AC_DEFINE([LIBINPUT_VERSION_MINOR], [libinput_minor_version], "libinput minor version number")
AC_DEFINE([LIBINPUT_VERSION_MICRO], [libinput_micro_version], "libinput micro version number")
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

View file

@ -25,6 +25,8 @@
#ifndef LIBINPUT_PRIVATE_H
#define LIBINPUT_PRIVATE_H
#include "config.h"
#include <errno.h>
#include <math.h>
@ -33,6 +35,12 @@
#include "libinput.h"
#include "libinput-util.h"
#if LIBINPUT_VERSION_MICRO >= 90
#define HTTP_DOC_LINK "https://wayland.freedesktop.org/libinput/doc/latest/"
#else
#define HTTP_DOC_LINK "https://wayland.freedesktop.org/libinput/doc/" VERSION "/"
#endif
struct libinput_source;
/* A coordinate pair in device coordinates */