Edit

IABSD.fr/xenocara/util/macros/xorgversion.m4

Branch :

  • Show log

    Commit

  • Author : matthieu
    Date : 2018-03-29 20:17:29
    Hash : 29028f9d
    Message : Update to util-macros 1.19.2

  • util/macros/xorgversion.m4
  • dnl Copyright 2005 Red Hat, Inc
    dnl
    dnl Permission to use, copy, modify, distribute, and sell this software and its
    dnl documentation for any purpose is hereby granted without fee, provided that
    dnl the above copyright notice appear in all copies and that both that
    dnl copyright notice and this permission notice appear in supporting
    dnl documentation.
    dnl
    dnl The above copyright notice and this permission notice shall be included
    dnl in all copies or substantial portions of the Software.
    dnl
    dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
    dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    dnl OTHER DEALINGS IN THE SOFTWARE.
    dnl
    dnl Except as contained in this notice, the name of the copyright holders shall
    dnl not be used in advertising or otherwise to promote the sale, use or
    dnl other dealings in this Software without prior written authorization
    dnl from the copyright holders.
    dnl
    
    # XORG_RELEASE_VERSION
    # --------------------
    # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
    
    AC_DEFUN([XORG_RELEASE_VERSION],[
    	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
    		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
    		[Major version of this package])
    	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
    	if test "x$PVM" = "x"; then
    		PVM="0"
    	fi
    	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
    		[$PVM],
    		[Minor version of this package])
    	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
    	if test "x$PVP" = "x"; then
    		PVP="0"
    	fi
    	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
    		[$PVP],
    		[Patch version of this package])
    ])
    
    # XORG_CHANGELOG()
    # ----------------
    # Minimum version: 1.2.0
    #
    # Defines the variable CHANGELOG_CMD as the command to generate
    # ChangeLog from git.
    #
    #
    AC_DEFUN([XORG_CHANGELOG], [
    CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
    mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
    || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
    touch \$(top_srcdir)/ChangeLog; \
    echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
    AC_SUBST([CHANGELOG_CMD])
    ]) # XORG_CHANGELOG