[cp-patches] Patch: FYI: speed up gen-classlist.sh

Tom Tromey tromey at redhat.com
Fri Apr 18 14:30:22 UTC 2008


>>>>> "Mark" == Mark Wielaard <mark at klomp.org> writes:

Mark> At this point $vm_dirlist is ../vm/reference and $1 is standard, but
Mark> there is no ../vm/reference/standard.omit file, so $vm_omitlist will
Mark> stay empty leading to the empty cat | sed.

Thanks for tracking this down.  And, sorry about the mess.
Here's the patch I'm committing.  This fixed it for me.

Tom

ChangeLog:
2008-04-18  Tom Tromey  <tromey at redhat.com>

	* lib/gen-classlist.sh.in: Skip 'sed' steps if no vm_omitlist
	found.

Index: lib/gen-classlist.sh.in
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v
retrieving revision 1.41
diff -u -r1.41 gen-classlist.sh.in
--- lib/gen-classlist.sh.in	17 Apr 2008 22:46:20 -0000	1.41
+++ lib/gen-classlist.sh.in	18 Apr 2008 14:29:43 -0000
@@ -119,8 +119,10 @@
       vm_omitlist="$vm_omitlist $dir/$1.omit"
    fi
 done
-cat $vm_omitlist | sed "$sed_omit_hash" > tmp.awk
-cat $vm_omitlist | sed "$sed_omit_main_loop" >> tmp.awk
+if test -n "$vm_omitlist"; then
+   cat $vm_omitlist | sed "$sed_omit_hash" > tmp.awk
+   cat $vm_omitlist | sed "$sed_omit_main_loop" >> tmp.awk
+fi
 @AWK@ -f tmp.awk < vm.add >>${top_builddir}/lib/classes.1
 
 rm -f vm.omit vm.add tmp.omit tmp.awk



More information about the Classpath-patches mailing list