[PATCH] util-macros: Addition of a meta data file xorg-macros.pc.in used by XORG_INSTALL

Gaetan Nadon gaetan.nadon at videotron.ca
Sun Nov 22 12:59:44 PST 2009


Thanks to Daniel Stone for providing the idea of using a .pc file. This
provides a robust implementation to copy the INSTALL file from a single
location to all xorg modules.  It can be updated every release if need
be with a single check-in.

The time honoured behaviours of ChangeLog are replicated.  When the file
cannot be copied, the existing one, if any, is not overwritten. If none
existed, an empty file is created so the tarball is created anyway.
Similar to ChangeLog, if the file is deleted from a tarball and
util-macros is not available, then it cannot be created. In that case,
one would have to obtain it from the original tarball or from git.

Note that xorg-macros.pc is installed in $prefix/share/pkgconfig because
it is architecture independent. I recalled a discussion about libxtrans
that could not cross compile.

I will release an additional patch for each module  to add both
ChangeLog and INSTALL on the MAINTAINERCLEANFILES list.

There has been questions as to what a module should do when additional
information is required, now that the INSTALL is standard. Here is an
excerpt fromthe INSTALL file:

Basic Installation
==================

   Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package.  The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.


Thank you very much for all those who helped with this issue.

The content of the XORG_INSTALL macro:

AC_REQUIRE([PKG_PROG_PKG_CONFIG])
macros_docdir=$($PKG_CONFIG --print-errors --variable=docdir
xorg-macros)
INSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp
&& \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
echo 'util-macros \"docdir\" from xorg-macros.pc not found: installing
possibly empty INSTALL.' >&2)"

The new xorg-macros.pc.in:

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
# Used by XORG_INSTALL
docdir=@docdir@

Name: X.Org Macros
Description: A set of autoconf project macros for X.Org modules
Version: @PACKAGE_VERSION@

To compare with XORG_CHANGELOG macro:

CHANGELOG_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)"




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.x.org/archives/xorg-devel/attachments/20091122/300e2ada/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xorg-macros.pc.in-create-a-meta-data-file-for-util.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091122/300e2ada/attachment.bin 


More information about the xorg-devel mailing list