Re: m4-common



On Fri, 2015-02-20 at 14:28 -0500, Ryan Lortie wrote:
karaj,

On Fri, Feb 20, 2015, at 13:56, Philip Withnall wrote:
That’s excellent. It potentially means we can remove the advice to add
AX_REQUIRE_DEFINED([YELP_HELP_INIT]) (etc.), since that’s now redundant
for tarball builds. For git builds, we could assume JHBuild will handle
this? That pattern is still useful for non-JHBuild git builds though, so
I’m on the fence.

fwiw, I think the checking is still useful.  jhbuild isn't the only
place where people ever try to build our modules from git, nor is it a
flawless system that is always fully in-sync with itself.

Sure, let's keep it. I suspect the most important design consideration
for the checking is to make it as fool-proof as possible for
cargo-culting, so for example people don't end up requiring macros they
aren't using.

*snip*
Another idea is that we could expand AX_REQUIRE_DEFINED to take multiple
macro names, and then write this:

m4_ifndef([AX_REQUIRE_DEFINED] [m4_fatal([Required m4 macros are
missing])])
AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS GLIB_SETTINGS PKG_CHECK_MODULES
GTK_DOC_CHECK])

which, at only two lines, manages to be completely foolproof against
missing macros (of any kind).

Either of the above two options work for me. I think a patch to make
AX_REQUIRE_DEFINED accept multiple macro names would be accepted
upstream.

I'm not sure whether one-macro-per-line or
multiple-macros-in-AX_REQUIRE_DEFINED would be more amenable to
cargo-culting. Maybe the one-macro-per-line approach?

I guess m4-common should also include a README which documents this,
plus the reason for m4-common existing as a way to centralise
downloading of the autoconf-archive macros we use.

OK.  Will do that.

Would it also be worthwhile adding a dist-hook which causes dist to fail
for m4-common, to make this really obvious?

Sure.  I can do that too.

Super, looking forward to it.

Both of these are done and the result is sitting in:

  https://github.com/desrt/m4-common

I think we're probably just about ready to put this in git.gnome.org and
add it to jhbuild.

Great! Ship it.

Philip

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]