classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Rewrite split-for-gcj


From: Andrew Haley
Subject: Re: [cp-patches] Rewrite split-for-gcj
Date: Mon, 15 Aug 2005 11:12:05 +0100

Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <address@hidden> writes:
 > 
 > Andrew> split-for-gcj takes an ungodly amount of time.  This is about 20x
 > Andrew> faster.  As far as I can see it does the same thing as the previous
 > Andrew> version.
 > 
 > Andrew> +BEGIN {
 > Andrew> +  print "Splitting for gcj"
 > Andrew> +  system ("rm -f Makefile.deps > /dev/null 2>&1")
 > Andrew> +  system ("test -d lists || mkdir lists")
 > 
 > I'm not an awk expert by any stretch ... one important thing here is
 > to make sure the code remains portable.  Any ideas on that?

You'll have to tell me what problems you forsee.  AFAIK use of AWK in
gcc builds is OK, I don't know that we have such rules for classpath.
Are you talking about mingw, or something else?

 > Andrew> +  # Only update a .list file if it changed.
 > Andrew> +  system ("for file in lists/*.list.1; do "         \
 > Andrew> +      "real=`echo \"$file\" | sed -e 's/.1$//'`;"   \
 > Andrew> +      "if cmp -s $real $file; then "                \
 > Andrew> +      "  rm $file; "                                        \
 > Andrew> +      "else "                                       \
 > Andrew> +      "  mv $file $real; "                          \
 > Andrew> +      "fi "                                         \
 > Andrew> +      "done")
 > Andrew> +}
 > Andrew> +
 > 
 > Maybe instead of long system calls we should just have an awk script
 > embedded in the original shell script.

Uh, OK.  I don't understand why.

 > If this is know to be portable, though, then it is fine by me.

Should be, sure.

Andrew.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]