Re: proposed gnome-common changes



On 20/05/2004 2:09 PM, Mark McLoughlin wrote:

   * Fix up GNOME_COMMON_INIT() so that it just AC_SUBST()'s
     ACLOCAL_AMFLAGS to '${ACLOCAL_FLAGS}'.  This makes sure that
     aclocal will be called with ${ACLOCAL_FLAGS} as arguments during
     rebuilds (which the old version was not guaranteeing).
	Cool, it wouldn't be a bad idea to remove this hack from every modules
configure.in as well then :-)
This is actually something that pretty much all modules should be doing, by the way. If you ignore the issue, then it will often cause rebuilds to fail since aclocal is called without $ACLOCAL_FLAGS, and it doesn't find the macros.

If you don't want to depend on gnome-common, you can stick the following two lines in your configure.in/ac file:
   ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
   AC_SUBST(ACLOCAL_AMFLAGS)

This is actually the entire contents of the GNOME_COMMON_INIT macro with my patch applied. This will cause the automake generated makefiles to pass the correct flags to aclocal, and works with all versions from 1.4 on (it might work with 1.3, but I no one is using that version).

A number of modules use an alternative method to get $ACLOCAL_FLAGS honoured, with the following configure.in line:
   ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

This gives a subtly different result -- when aclocal is called during a rebuild, it will be called with the flags from the previous time configure was run. Both options give the same results if $ACLOCAL_FLAGS remains the same, but I'd tend to prefer the first approach (ie. if you modify $ACLOCAL_FLAGS because you left out a macros directory, modules using the second approach would continue to use the old flags for at least one more run of configure).

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





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