You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Jim Meyering <ji...@meyering.net> on 2006/12/15 18:28:45 UTC

dependencies turned off in configure.ac?!? w/patch

Once you get used to -- and start depending on -- automatic
dependencies, not having them can be dangerous.

Well, I was surprised to see that they're broken, now.
I discovered this when I changed a gentools/.../*.java file and
none of the gen/* files was regenerated :-(

I tracked it down.
The problem is that the following code in configure.ac changed,
but I don't know why;  there's no indication in the commit log.

Here's the original snippet:

  build=yes
  test x$JAVA  = xno && build=no
  test x$JAVAC = xno && build=no
  test -d $srcdir/../gentools || build=no
  test -d $srcdir/../specs    || build=no
  AM_CONDITIONAL([BUILD_IN_MESSAGE_TREE], [test x$build = xyes])

Now it looks like this:

  build=yes
  AC_CHECK_PROGS([JAVA],  [java],  [no])
  AC_CHECK_PROGS([JAVAC], [javac], [no])
  AM_CONDITIONAL([CAN_GENERATE_CODE],
    [test x$JAVA = xyes -a  x$JAVAC = xyes -a -d $srcdir/../gentools -a -d $srcdir/../specs ])

I notice the name change: s/BUILD_IN_MESSAGE_TREE/CAN_GENERATE_CODE/.
Was there something wrong with the original?

Here's a patch to restore the original logic, but with
the new name.  Some notes:
 - $JAVA and $JAVAC (if found) are set to the names of the programs.
     If not found, they're set to 'no'.  Since we hope to be able to use
     gcj, it's best not to check for e.g., $JAVA = java
 - using test's -a operator is not portable to older systems that
     do implement it, but get the precedence wrong.
 - it's nice to keep line length < 80, for readability, and so things
     fit on printouts and (more importantly, imho) side-by-side diffs


Rather than writing this up, I'd have much preferred
to simply check in the change and be done with it, but I still
don't have commit access, so I'll let someone else do the honors.

----------------------------------------
2006-12-15  Jim Meyering  <me...@redhat.com>

	* configure.ac: Restore the logic used to determine whether to
	generate dependencies on XML specs and files in gentools/.

Index: configure.ac
===================================================================
--- configure.ac	(revision 487512)
+++ configure.ac	(working copy)
@@ -36,11 +36,14 @@
 # Turn on this automake conditional if we are in a qpid
 # hierarchy (i.e. with gentools/ and specs/ sibling directories),
 # and if we have working java + javac.
-build=yes
 AC_CHECK_PROGS([JAVA],  [java],  [no])
 AC_CHECK_PROGS([JAVAC], [javac], [no])
-AM_CONDITIONAL([CAN_GENERATE_CODE],
-  [test x$JAVA  = xyes -a  x$JAVAC = xyes -a -d $srcdir/../gentools -a -d $srcdir/../specs ])
+build=yes
+test x$JAVA  = xno && build=no
+test x$JAVAC = xno && build=no
+test -d $srcdir/../gentools || build=no
+test -d $srcdir/../specs    || build=no
+AM_CONDITIONAL([CAN_GENERATE_CODE], [test x$build = xyes])

 # Warnings: Enable as many as possible, keep the code clean. Please
 # do not disable warnings or remove -Werror without discussing on