From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8017 invoked by alias); 6 Jul 2008 12:07:00 -0000 Received: (qmail 7997 invoked by uid 22791); 6 Jul 2008 12:06:59 -0000 X-Spam-Check-By: sourceware.org Received: from merkur.ins.uni-bonn.de (HELO merkur.ins.uni-bonn.de) (131.220.223.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 06 Jul 2008 12:06:32 +0000 Received: from localhost.localdomain (xdsl-87-78-134-2.netcologne.de [87.78.134.2]) by merkur.ins.uni-bonn.de (Postfix) with ESMTP id 95BF0400014FC; Sun, 6 Jul 2008 14:06:29 +0200 (CEST) Received: from ralf by localhost.localdomain with local (Exim 4.63) (envelope-from ) id 1KFT0L-0004tf-9C; Sun, 06 Jul 2008 14:06:09 +0200 Date: Sun, 06 Jul 2008 12:07:00 -0000 From: Ralf Wildenhues To: classpath-patches@gnu.org, gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org Subject: [PATCH, classpath, build] Use AM_COND_IF if available. Message-ID: <20080706120608.GA9488@ins.uni-bonn.de> Mail-Followup-To: Ralf Wildenhues , classpath-patches@gnu.org, gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2008-q3/txt/msg00009.txt.bz2 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 * 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