Re: [PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-29 Thread Dan Nicholson
On Sun, Nov 28, 2010 at 1:39 PM, Gaetan Nadon mems...@videotron.ca wrote:
 On Sun, 2010-11-28 at 21:26 +0100, Jan Engelhardt wrote:

 On Sunday 2010-11-28 19:45, Gaetan Nadon wrote:

On Sun, 2010-11-28 at 15:46 +0100, Jan Engelhardt wrote:
  +ACLOCAL_AMFLAGS = -I m4

This will fail if m4 does not exist at clone time.
It won't because there is a .gotognore file in there.
However, it will be suggested later to use the same
toplevel .gitignore file that is used in all other 240 xorg modules.

 Then perhaps you need to update the master xorg .gitignore, because the
 suggestion to use ACLOACL_AMFLAGS will appear on any project with a
 libtool library.

 The suggestion to use ACLOCAL_AMFLAGS come from the Autoconf tools.
 I looked at the warnings and the output of autoupdate and autoscan and there
 are plenty of warnings that do not apply.

Pretty sure it's coming from libtoolize :)

libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4]) to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding -I m4 to ACLOCAL_AMFLAGS in Makefile.am.

It's suggesting that you add AC_CONFIG_MACRO_DIR([m4]) so that it will
helpfully install it's m4 files there and attempt to make them
persistent. Jeremy Huddleston asked not to do this a while back
because it's then harder to replace the included libtool with the
patched version on OSX. Not sure if this is still a problem, but there
are definitely pros and cons to distributing the libtool macros in the
tree.

--
Dan
___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: [PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-29 Thread Gaetan Nadon
On Mon, 2010-11-29 at 06:02 -0800, Dan Nicholson wrote:

 Pretty sure it's coming from libtoolize :)

It does.

 
 libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4]) to
 configure.ac and
 libtoolize: rerunning libtoolize, to keep the correct libtool macros
 in-tree.
 libtoolize: Consider adding -I m4 to ACLOCAL_AMFLAGS in Makefile.am.
 
 It's suggesting that you add AC_CONFIG_MACRO_DIR([m4]) so that it will
 helpfully install it's m4 files there and attempt to make them
 persistent. Jeremy Huddleston asked not to do this a while back
 because it's then harder to replace the included libtool with the
 patched version on OSX. Not sure if this is still a problem, but there
 are definitely pros and cons to distributing the libtool macros in the
 tree.
 

There are quite a few modules having an m4 directory. This is where
modules put their additional
m4 macros (unrelated to libtool). There may be additional behaviours
associated with having an m4 directory.
It's still not clear to me. In any case, the libtool macros are shipped
in aclocal.m4. I think the issue was libtool v2 versus 1.5.
I don't think it's a problem anymore.

The -I m4 should not be added when you have no macros in git. Libtool
does not need that to work and it will break
the build on a fresh repo clone because m4 cannot be found.




signature.asc
Description: This is a digitally signed message part
___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Re: [PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-29 Thread Jeremy Huddleston

On Nov 29, 2010, at 09:02, Dan Nicholson wrote:

 On Sun, Nov 28, 2010 at 1:39 PM, Gaetan Nadon mems...@videotron.ca wrote:
 On Sun, 2010-11-28 at 21:26 +0100, Jan Engelhardt wrote:
 
 On Sunday 2010-11-28 19:45, Gaetan Nadon wrote:
 
 On Sun, 2010-11-28 at 15:46 +0100, Jan Engelhardt wrote:
 +ACLOCAL_AMFLAGS = -I m4
 
 This will fail if m4 does not exist at clone time.
 It won't because there is a .gotognore file in there.
 However, it will be suggested later to use the same
 toplevel .gitignore file that is used in all other 240 xorg modules.
 
 Then perhaps you need to update the master xorg .gitignore, because the
 suggestion to use ACLOACL_AMFLAGS will appear on any project with a
 libtool library.
 
 The suggestion to use ACLOCAL_AMFLAGS come from the Autoconf tools.
 I looked at the warnings and the output of autoupdate and autoscan and there
 are plenty of warnings that do not apply.
 
 Pretty sure it's coming from libtoolize :)
 
 libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4]) to configure.ac and
 libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
 libtoolize: Consider adding -I m4 to ACLOCAL_AMFLAGS in Makefile.am.
 
 It's suggesting that you add AC_CONFIG_MACRO_DIR([m4]) so that it will
 helpfully install it's m4 files there and attempt to make them
 persistent. Jeremy Huddleston asked not to do this a while back
 because it's then harder to replace the included libtool with the
 patched version on OSX. Not sure if this is still a problem, but there
 are definitely pros and cons to distributing the libtool macros in the
 tree.

It doesn't have anything to do specifically with OSX.  It's any version of 
libtool.  IIRC, if we ship with glibtool-2.x, that version's macros will be 
added to the m4 directory.  If we then do an 'autoreconf -fvi' in the 
directory, depending on the version of glibtool on the system, it's not 
deterministic which version of the m4 macros will be used (packaged versus 
system)... but the system's glibtool will always be used...


___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


[PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-28 Thread Jan Engelhardt
libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4]) to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding -I m4 to ACLOCAL_AMFLAGS in Makefile.am.

Signed-off-by: Jan Engelhardt jeng...@medozas.de
---
 Makefile.am   |2 ++
 configure.ac  |1 +
 m4/.gitignore |2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 m4/.gitignore

diff --git a/Makefile.am b/Makefile.am
index 6c97739..80a4553 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+ACLOCAL_AMFLAGS = -I m4
+
 SUBDIRS = include src test
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index 670700f..7669027 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AC_INIT([libxkbcommon], [0.1.0],
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_SILENT_RULES([yes])
 AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_MACRO_DIR([m4])
 
 AC_PROG_LIBTOOL
 AC_PROG_CC
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 000..8d0c756
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,2 @@
+/lt*.m4
+/libtool.m4
-- 
1.7.1

___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: [PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-28 Thread Gaetan Nadon
On Sun, 2010-11-28 at 15:46 +0100, Jan Engelhardt wrote:

 +ACLOCAL_AMFLAGS = -I m4
 

This will fail if m4 does not exist at clone time.
It won't because there is a .gotognore file in there.
However, it will be suggested later to use the same
toplevel .gitignore file that is used in all other 240 xorg modules.


signature.asc
Description: This is a digitally signed message part
___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Re: [PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-28 Thread Jan Engelhardt
On Sunday 2010-11-28 19:45, Gaetan Nadon wrote:

On Sun, 2010-11-28 at 15:46 +0100, Jan Engelhardt wrote:
  +ACLOCAL_AMFLAGS = -I m4

This will fail if m4 does not exist at clone time.
It won't because there is a .gotognore file in there.
However, it will be suggested later to use the same
toplevel .gitignore file that is used in all other 240 xorg modules.

Then perhaps you need to update the master xorg .gitignore, because the 
suggestion to use ACLOACL_AMFLAGS will appear on any project with a 
libtool library.
___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: [PATCH 1/5] build: use AC_CONFIG_MACRO_DIR as per libtoolize warning

2010-11-28 Thread Gaetan Nadon
On Sun, 2010-11-28 at 21:26 +0100, Jan Engelhardt wrote:

 On Sunday 2010-11-28 19:45, Gaetan Nadon wrote:
 
 On Sun, 2010-11-28 at 15:46 +0100, Jan Engelhardt wrote:
   +ACLOCAL_AMFLAGS = -I m4
 
 This will fail if m4 does not exist at clone time.
 It won't because there is a .gotognore file in there.
 However, it will be suggested later to use the same
 toplevel .gitignore file that is used in all other 240 xorg modules.
 
 Then perhaps you need to update the master xorg .gitignore, because the 
 suggestion to use ACLOACL_AMFLAGS will appear on any project with a 
 libtool library.


The suggestion to use ACLOCAL_AMFLAGS come from the Autoconf tools.
I looked at the warnings and the output of autoupdate and autoscan and
there
are plenty of warnings that do not apply.

If you are using 2.65 (or even 2.68), it will give you warnings that are
not applicable
to 2.60. The docs don't tell you (or rarely) which features belong to
which release.

The .gitignore file is not related to Autotools, just git. If you end up
with an empty m4
directory, and you have -I m4, aclocal will fail. In fact you should not
have -I m4
anyway because you have no macros in there.

If you install the toplevel .gitignore as I suggested, you can
remove .gitignore from m4.
Then you need to remove -I m4 or it will fail during a clone. That's the
chain of events
I was warning about.

If you grep for -I m4 in other xorg modules, you'll the pattern.

I thought I'd share stuff I learned the hard way!








signature.asc
Description: This is a digitally signed message part
___
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com