[PATCH v2] Print git describe output into the log file.

Gaetan Nadon memsize at videotron.ca
Fri Apr 16 10:32:06 PDT 2010


On Fri, 2010-04-16 at 06:31 -0700, Dan Nicholson wrote:

> It might be nicer, but could get messy when you consider all the
> corner cases.
> 

True, and the mess can be contained in a macro. Reusing the design for
ChangeLog is worth a shot. 
Not to mention the script brings a mess of it's own in the build. It
introduces multiple points of failure.
Finding a home for the mess is not obvious. 

.PHONY: xorg-git-version.h

xorg-git-version.h:
       $(XORG_GENERATE_VERSION_CMD)


In xserver/m4/xorg_generate_version.m4:
(Replace the ChangeLog script with generate version script.)

AC_DEFUN([XORG_GENERATE_VERSION], [
XORG_GENERATE_VERSION_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([XORG_GENERATE_VERSION_CMD])
]) # XORG_GENERATE_VERSION


I went through the same thought process with the INSTALL_CMD. I started
with something different and ended up copying and modifying the
ChangeLog command because it did consider all the corner cases. The
script is just a bit more complex, but it does not matter as it is
hidden. At the end of the day, it just writes a file.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100416/de036cc5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100416/de036cc5/attachment-0001.pgp>


More information about the xorg-devel mailing list