Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

Commit 2af62b1

Browse files
committed
Use XORG_CHANGELOG to generate the changelog.
Steal the XORG_CHANGELOG macro from X.Org and stash it in acinclude.m4.
1 parent f13dd10 commit 2af62b1

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ EXTRA_DIST = vdpau.pc.in autogen.sh ChangeLog
88
.PHONY: ChangeLog
99

1010
ChangeLog:
11-
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
11+
$(CHANGELOG_CMD)
1212

1313
dist-hook: ChangeLog

acinclude.m4

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

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ AC_CHECK_FUNC([dlopen], [],
2626
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
2727
AC_SUBST([DLOPEN_LIBS])
2828

29+
XORG_CHANGELOG
30+
2931
AC_OUTPUT([Makefile
3032
src/Makefile
3133
trace/Makefile

0 commit comments

Comments
 (0)