<http://thread.gmane.org/gmane.comp.sysutils.automake.patches/3129/focus=3154> fixes the automake issue with automake-conditional AC_CONFIG_FILES.
This patch makes classpath use AM_COND_IF if it is available (i.e., the issue will be fixed once the tree moves to Automake 1.11). Tested by building the tree with --{enable,disable}-tool-wrappers and with Automake 1.9.6 and git Automake. OK for GCC trunk, and if yes, can somebody push this to classpath upstream? Thanks, Ralf libjava/classpath/ChangeLog: 2008-07-06 Ralf Wildenhues <[EMAIL PROTECTED]> * m4/acinclude.m4 (CLASSPATH_COND_IF): New macro. * configure.ac: Use it. * configure: Regenerate. * tools/Makefile.am (!CREATE_WRAPPERS): Update comment. diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac index a14d2c1..54a3efc 100644 --- a/libjava/classpath/configure.ac +++ b/libjava/classpath/configure.ac @@ -1059,9 +1059,8 @@ examples/Makefile examples/Makefile.jawt examples/Makefile.java2d]) -if test "x${COMPILE_WRAPPERS}" = xno -then -AC_CONFIG_FILES([tools/gappletviewer +CLASSPATH_COND_IF([CREATE_WRAPPERS], [test "x${COMPILE_WRAPPERS}" = xyes], [], +[AC_CONFIG_FILES([tools/gappletviewer tools/gjarsigner tools/gkeytool tools/gjar @@ -1073,6 +1072,7 @@ tools/gorbd tools/grmid tools/grmic tools/gjavah]) + AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer]) AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner]) AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool]) @@ -1085,7 +1085,7 @@ AC_CONFIG_COMMANDS([gorbd],[chmod 755 tools/gorbd]) AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid]) AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic]) AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah]) -fi +]) AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh]) AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh]) diff --git a/libjava/classpath/m4/acinclude.m4 b/libjava/classpath/m4/acinclude.m4 index 6c4eacd..9f98f1c 100644 --- a/libjava/classpath/m4/acinclude.m4 +++ b/libjava/classpath/m4/acinclude.m4 @@ -246,3 +246,19 @@ EOF rm -f $JAVA_TEST $CLASS_TEST AC_SUBST(JAVAC_MEM_OPT) ]) + +dnl --------------------------------------------------------------- +dnl CLASSPATH_COND_IF(COND, SHELL-CONDITION, [IF-TRUE], [IF-FALSE]) +dnl --------------------------------------------------------------- +dnl Automake 1.11 can emit conditional rules for AC_CONFIG_FILES, +dnl using AM_COND_IF. This wrapper uses it if it is available, +dnl otherwise falls back to code compatible with Automake 1.9.6. +AC_DEFUN([CLASSPATH_COND_IF], +[m4_ifdef([AM_COND_IF], + [AM_COND_IF([$1], [$3], [$4])], + [if $2; then + m4_default([$3], [:]) + else + m4_default([$4], [:]) + fi +])]) diff --git a/libjava/classpath/tools/Makefile.am b/libjava/classpath/tools/Makefile.am index 9422827..81953bc 100755 --- a/libjava/classpath/tools/Makefile.am +++ b/libjava/classpath/tools/Makefile.am @@ -89,7 +89,8 @@ noinst_SCRIPTS = gappletviewer gjarsigner gkeytool \ gjar gnative2ascii gserialver gjavah grmiregistry \ gtnameserv gorbd grmid grmic bin_PROGRAMS = -## FIXME: revisit this with a newer automake. +## FIXME: remove these unneeded dependency lines once we can +## require Automake 1.11. gappletviewer: gappletviewer.in gjarsigner: gjarsigner.in gkeytool: gkeytool.in