On Wed, 2009-11-25 at 12:55 +1000, Peter Hutterer wrote: > On Sun, Nov 22, 2009 at 03:59:44PM -0500, Gaetan Nadon wrote: > > > > 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 > > was this supposed to be in this patch? > it'd make sense to include it to this patch instead of a separate one since > the reason for the .pc file is this very macro. >
You were right, as always! This part was missing from the patch, my mistake. I found it while doing additional testing. I am attaching the new patch. Sorry about this. > > > From 2c10c1b272a9388e7ef3f8a6e1f723acea3be5af Mon Sep 17 00:00:00 2001 > > From: Gaetan Nadon <[email protected]> > > Date: Sat, 21 Nov 2009 17:28:32 -0500 > > Subject: [PATCH] xorg-macros.pc.in: create a meta data file for util-macros > > > > This is motivated primarly by XORG_INSTALL who needs to locate > > the docdir when invoked from any module that may not be installed > > using same prefix (default or otherwise). > > > > There are other potential use for this file. > > --- > > Makefile.am | 5 +++++ > > configure.ac | 1 + > > xorg-macros.pc.in | 14 ++++++++++++++ > > 3 files changed, 20 insertions(+), 0 deletions(-) > > create mode 100644 xorg-macros.pc.in > > > > diff --git a/Makefile.am b/Makefile.am > > index 49c2d17..1e07014 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -29,6 +29,11 @@ dist_doc_DATA = INSTALL > > install-data-hook: > > rm -f $(DESTDIR)$(aclocaldir)/xorgversion.m4 > > > > +pkgconfigdir = $(datadir)/pkgconfig > > +pkgconfig_DATA = xorg-macros.pc > > + > > +EXTRA_DIST = xorg-macros.pc.in > > + > > .PHONY: ChangeLog > > > > ChangeLog: > > diff --git a/configure.ac b/configure.ac > > index 8b1d450..4daec6a 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -40,5 +40,6 @@ m4_include([xorgversion.m4]) > > XORG_RELEASE_VERSION > > XORG_CHANGELOG > > > > +AC_CONFIG_FILES([xorg-macros.pc]) > > AC_CONFIG_FILES([Makefile xorg-macros.m4:xorg-macros.m4.in:xorgversion.m4]) > > any reason that can't be in a single command, like AC_OUTPUT in most other > modules? i.e. > > AC_CONFIG_FILES([xorg-macros.pc > Makefile > etc]) > > Cheers, > Peter > _______________________________________________ > xorg-devel mailing list > [email protected] > http://lists.x.org/mailman/listinfo/xorg-devel
>From 1e50b971bf7273f958e11cbcf3dc07a6fab04335 Mon Sep 17 00:00:00 2001 From: Gaetan Nadon <[email protected]> Date: Sat, 21 Nov 2009 17:28:32 -0500 Subject: [PATCH] xorg-macros.pc.in: create a meta data file for util-macros This is motivated primarly by XORG_INSTALL who needs to locate the docdir when invoked from any module that may not be installed using same prefix (default or otherwise). There are other potential use for this file. --- Makefile.am | 5 +++++ configure.ac | 1 + xorg-macros.m4.in | 9 ++++++--- xorg-macros.pc.in | 14 ++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 xorg-macros.pc.in diff --git a/Makefile.am b/Makefile.am index 49c2d17..1e07014 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,11 @@ dist_doc_DATA = INSTALL install-data-hook: rm -f $(DESTDIR)$(aclocaldir)/xorgversion.m4 +pkgconfigdir = $(datadir)/pkgconfig +pkgconfig_DATA = xorg-macros.pc + +EXTRA_DIST = xorg-macros.pc.in + .PHONY: ChangeLog ChangeLog: diff --git a/configure.ac b/configure.ac index 8b1d450..4daec6a 100644 --- a/configure.ac +++ b/configure.ac @@ -40,5 +40,6 @@ m4_include([xorgversion.m4]) XORG_RELEASE_VERSION XORG_CHANGELOG +AC_CONFIG_FILES([xorg-macros.pc]) AC_CONFIG_FILES([Makefile xorg-macros.m4:xorg-macros.m4.in:xorgversion.m4]) AC_OUTPUT diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 336490a..6f9635f 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -509,8 +509,11 @@ XORG_MANPAGE_SECTIONS # INSTALL from $prefix/share/doc/util-macros. # AC_DEFUN([XORG_INSTALL], [ -INSTALL_CMD="if test -f "$prefix/share/doc/util-macros/INSTALL"; then \ -cp -f "$prefix/share/doc/util-macros/INSTALL" \$(top_srcdir); \ -else echo '$prefix/share/doc/util-macros/INSTALL cannot be found.' >&2; fi " +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)" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL diff --git a/xorg-macros.pc.in b/xorg-macros.pc.in new file mode 100644 index 0000000..1144fb4 --- /dev/null +++ b/xorg-macros.pc.in @@ -0,0 +1,14 @@ +pref...@prefix@ +exec_pref...@exec_prefix@ +libd...@libdir@ +included...@includedir@ +datarootd...@datarootdir@ +datad...@datadir@ +package_tarna...@package_tarname@ +# Used by XORG_INSTALL +docd...@docdir@ + +Name: X.Org Macros +Description: A set of autoconf project macros for X.Org modules +Version: @PACKAGE_VERSION@ + -- 1.6.0.4
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
