1a4f78defSmrg# XORG_CHANGELOG()
2a4f78defSmrg# ----------------
3a4f78defSmrg# Minimum version: 1.2.0
4a4f78defSmrg#
5a4f78defSmrg# Defines the variable CHANGELOG_CMD as the command to generate
6a4f78defSmrg# ChangeLog from git.
7a4f78defSmrg#
8a4f78defSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
9a4f78defSmrg#
10a4f78defSmrg# Stolen from xorg-macros.m4, which has this license:
11a4f78defSmrg# xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
12a4f78defSmrg#
13a4f78defSmrg# Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
14a4f78defSmrg#
15a4f78defSmrg# Permission is hereby granted, free of charge, to any person obtaining a
16a4f78defSmrg# copy of this software and associated documentation files (the
17a4f78defSmrg# "Software"), to deal in the Software without restriction, including
18a4f78defSmrg# without limitation the rights to use, copy, modify, merge, publish,
19a4f78defSmrg# distribute, and/or sell copies of the Software, and to permit persons
20a4f78defSmrg# to whom the Software is furnished to do so, provided that the above
21a4f78defSmrg# copyright notice(s) and this permission notice appear in all copies of
22a4f78defSmrg# the Software and that both the above copyright notice(s) and this
23a4f78defSmrg# permission notice appear in supporting documentation.
24a4f78defSmrg#
25a4f78defSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26a4f78defSmrg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27a4f78defSmrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
28a4f78defSmrg# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
29a4f78defSmrg# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
30a4f78defSmrg# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
31a4f78defSmrg# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
32a4f78defSmrg# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
33a4f78defSmrg# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34a4f78defSmrg#
35a4f78defSmrg# Except as contained in this notice, the name of a copyright holder
36a4f78defSmrg# shall not be used in advertising or otherwise to promote the sale, use
37a4f78defSmrg# or other dealings in this Software without prior written authorization
38a4f78defSmrg# of the copyright holder.
39a4f78defSmrg#
40a4f78defSmrgAC_DEFUN([XORG_CHANGELOG], [
41a4f78defSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
42a4f78defSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
43a4f78defSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
44a4f78defSmrgAC_SUBST([CHANGELOG_CMD])
45a4f78defSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
46a4f78defSmrg]) # XORG_CHANGELOG
47