summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/lib/split-for-gcj.sh
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-04 15:44:59 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-04 15:44:59 +0000
commit169cdb47e4f165e6716feefad48321205444342b (patch)
tree02f1e178f534d6216a8adca22d7b0bdc9d7e927f /libjava/classpath/lib/split-for-gcj.sh
parente3b560a6d4444727d62c3f0af81df32384cea4bd (diff)
downloadppe42-gcc-169cdb47e4f165e6716feefad48321205444342b.tar.gz
ppe42-gcc-169cdb47e4f165e6716feefad48321205444342b.zip
Temporarily reverting previous patch due to build-breaking bug.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112671 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/lib/split-for-gcj.sh')
-rwxr-xr-xlibjava/classpath/lib/split-for-gcj.sh28
1 files changed, 13 insertions, 15 deletions
diff --git a/libjava/classpath/lib/split-for-gcj.sh b/libjava/classpath/lib/split-for-gcj.sh
index 4130d56648a..f69b7979728 100755
--- a/libjava/classpath/lib/split-for-gcj.sh
+++ b/libjava/classpath/lib/split-for-gcj.sh
@@ -22,24 +22,22 @@
# java/awt/BitwiseXORComposite.class: lists/java-awt.stamp
# lists/java-awt.list: /home/aph/gcc/gcc/libjava/classpath/gnu/java/awt/BitwiseXORComposite.java
+# This uses a somewhat hacky procedure for finding the package of a
+# given file.
+
echo "Splitting for gcj"
rm -f Makefile.dtmp > /dev/null 2>&1
test -d lists || mkdir lists
-# Much more efficient to do processing outside the loop...
-# The first expression computes the .class file name.
-# We only want the first three package components, and
-# we want them separated by '-'; this is the remaining expressions.
-sed -e 's, \(.*\)[.]java$, \1.java \1.class,' \
- -e 's,^\([^/ ]*\)/\([^/ ]*\) ,\1-\2 ,' \
- -e 's,^\([^/ ]*\)/\([^/ ]*\)/\([^/ ]*\) ,\1-\2-\3 ,' \
- -e 's,^\([^/ ]*\)/\([^/ ]*\)/\([^/ ]*\)/[^ ]* ,\1-\2-\3 ,' \
- classes.2 |
-while read pkg dir file f2; do
- list=lists/$pkg
- echo "$dir/$file" >> ${list}.list.1
-
- echo "$f2: ${list}.stamp" >> Makefile.dtmp
- echo "${list}.list: $dir/$file" >> Makefile.dtmp
+for dir in java javax gnu org; do
+ fgrep /$dir/ classes | while read file; do
+ pkg=`echo "$file " | sed -n -e "s,^.*/\($dir/.*\)/[^/]*$,\1,p"`
+ list=lists/`echo $pkg | sed -e 's,/,-,g' | cut -f1-3 -d-`
+ echo "$file" >> ${list}.list.1
+ f2=`echo "$file" | sed -n -e "s,^.*/\($dir/.*\)$,\1,p"`
+ f2=`echo "$f2" | sed -e 's/.java$//'`.class
+ echo "$f2: ${list}.stamp" >> Makefile.dtmp
+ echo "${list}.list: $file" >> Makefile.dtmp
+ done
done
# Only update a .list file if it changed.
OpenPOWER on IntegriCloud