This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [JAVA] /bin/sh portability issues in gen-classlist.sh.in


Hi Tom,

On 18 Aug 2006, Tom Tromey wrote:
> Roger> Ok for mainline?
>
> It is fine by me, but I wanted to ask first whether Paolo's objection
> (directories with spaces) needed to be addressed first.  Do we support
> that?
>
> Whatever we decide, I'll commit the result to Classpath...

Sorry for the delay.  Here's a revised version of the gen-classlist.sh.in
change that incorporates Paolo's suggestions.  This patch has been tested
on i386-pc-solaris2.10 (with a tweaked boehm-gc) using the native /bin/sh
where it allows compilation of libjava to get further than previously.

Thanks,


2006-08-24  Roger Sayle  <roger@eyesopen.com>
	    Ian Lance Taylor  <ian@airs.com>
	    Paolo Bonzini <bonzini@gnu.org>

	* lib/gen-classlist.sh.in:  Avoid using test's -ef operator for
	increased portability.  Likewise, use -f instead of -e.


Index: lib/gen-classlist.sh.in
===================================================================
*** lib/gen-classlist.sh.in	(revision 116321)
--- lib/gen-classlist.sh.in	(working copy)
*************** for dir in $vm_dirlist; do
*** 55,61 ****
  done

  # Only include generated files once.
! if test ! "${top_builddir}" -ef "@top_srcdir@"; then
    echo "Adding generated files in builddir '${top_builddir}'."
    # Currently the only generated files are in gnu.*.
    (cd ${top_builddir}; @FIND@ gnu -follow -name '*.java' -print) |
--- 55,63 ----
  done

  # Only include generated files once.
! abs_top_builddir=`cd "${top_builddir}"; pwd`
! abs_top_srcdir=`cd "@top_srcdir@"; pwd`
! if test "$abs_top_builddir" != "$abs_top_srcdir"; then
    echo "Adding generated files in builddir '${top_builddir}'."
    # Currently the only generated files are in gnu.*.
    (cd ${top_builddir}; @FIND@ gnu -follow -name '*.java' -print) |
*************** rm vm.add
*** 95,101 ****
  rm tmp.omit

  new=
! if test -e ${top_builddir}/lib/classes.2; then
    p=`diff ${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1`
    if test "$p" != ""; then
      new="true"
--- 97,103 ----
  rm tmp.omit

  new=
! if test -f ${top_builddir}/lib/classes.2; then
    p=`diff ${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1`
    if test "$p" != ""; then
      new="true"


Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]