* [PATCH, classpath, build] Use AM_COND_IF if available.
@ 2008-07-06 12:07 Ralf Wildenhues
2008-07-14 18:51 ` Ralf Wildenhues
2008-07-16 13:59 ` Tom Tromey
0 siblings, 2 replies; 5+ messages in thread
From: Ralf Wildenhues @ 2008-07-06 12:07 UTC (permalink / raw)
To: classpath-patches, gcc-patches, java-patches
<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 <Ralf.Wildenhues@gmx.de>
* 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, classpath, build] Use AM_COND_IF if available.
2008-07-06 12:07 [PATCH, classpath, build] Use AM_COND_IF if available Ralf Wildenhues
@ 2008-07-14 18:51 ` Ralf Wildenhues
2008-07-15 5:56 ` Paolo Bonzini
2008-07-16 13:59 ` Tom Tromey
1 sibling, 1 reply; 5+ messages in thread
From: Ralf Wildenhues @ 2008-07-14 18:51 UTC (permalink / raw)
To: classpath-patches, gcc-patches, java-patches
Ping <http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00455.html>
* Ralf Wildenhues wrote on Sun, Jul 06, 2008 at 02:06:09PM CEST:
> <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?
> libjava/classpath/ChangeLog:
> 2008-07-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
>
> * m4/acinclude.m4 (CLASSPATH_COND_IF): New macro.
> * configure.ac: Use it.
> * configure: Regenerate.
> * tools/Makefile.am (!CREATE_WRAPPERS): Update comment.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, classpath, build] Use AM_COND_IF if available.
2008-07-06 12:07 [PATCH, classpath, build] Use AM_COND_IF if available Ralf Wildenhues
2008-07-14 18:51 ` Ralf Wildenhues
@ 2008-07-16 13:59 ` Tom Tromey
1 sibling, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2008-07-16 13:59 UTC (permalink / raw)
To: Ralf Wildenhues; +Cc: classpath-patches, gcc-patches, java-patches
>>>>> "Ralf" == Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
Ralf> Tested by building the tree with --{enable,disable}-tool-wrappers and
Ralf> with Automake 1.9.6 and git Automake. OK for GCC trunk, and if yes, can
Ralf> somebody push this to classpath upstream?
This is ok.
I will check it in to classpath.
thanks,
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-15 15:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-06 12:07 [PATCH, classpath, build] Use AM_COND_IF if available Ralf Wildenhues
2008-07-14 18:51 ` Ralf Wildenhues
2008-07-15 5:56 ` Paolo Bonzini
2008-07-15 15:30 ` Paolo Bonzini
2008-07-16 13:59 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).