diff options
Diffstat (limited to 'recipes-core/ecj/libecj-bootstrap.inc')
-rw-r--r-- | recipes-core/ecj/libecj-bootstrap.inc | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/recipes-core/ecj/libecj-bootstrap.inc b/recipes-core/ecj/libecj-bootstrap.inc index c86654d..2cdb6e4 100644 --- a/recipes-core/ecj/libecj-bootstrap.inc +++ b/recipes-core/ecj/libecj-bootstrap.inc | |||
@@ -17,13 +17,8 @@ JAR = "ecj-bootstrap-${PV}.jar" | |||
17 | 17 | ||
18 | do_unpackpost[dirs] = "${B}" | 18 | do_unpackpost[dirs] = "${B}" |
19 | do_unpackpost() { | 19 | do_unpackpost() { |
20 | if [ ! -d source ]; then | 20 | mkdir -p source |
21 | mkdir source | 21 | mkdir -p build |
22 | fi | ||
23 | |||
24 | if [ ! -d build ]; then | ||
25 | mkdir build | ||
26 | fi | ||
27 | 22 | ||
28 | # Remove crap. | 23 | # Remove crap. |
29 | rm -f about.html build.xml | 24 | rm -f about.html build.xml |
@@ -44,24 +39,18 @@ do_unpackpost() { | |||
44 | cp -R source/org build/ | 39 | cp -R source/org build/ |
45 | 40 | ||
46 | # Remove source code and other stuff. | 41 | # Remove source code and other stuff. |
47 | find build -name '*.java' -exec rm -f {} \; | 42 | find build -depth \( -name '*.java' -o -name '*.html' \) -delete |
48 | find build -name '*.html' -exec rm -f {} \; | ||
49 | } | 43 | } |
50 | 44 | ||
51 | addtask unpackpost after do_unpack before do_patch | 45 | addtask unpackpost after do_unpack before do_patch |
52 | 46 | ||
53 | do_compile() { | 47 | do_compile() { |
54 | find source -name '*.java' | LC_ALL=C sort > sourcefiles | ||
55 | split -l 25 sourcefiles ecj-sources. | ||
56 | |||
57 | # Compiling in place is done because the sources contain | 48 | # Compiling in place is done because the sources contain |
58 | # property files which need to be available at runtime. | 49 | # property files which need to be available at runtime. |
59 | for list in `find . -name 'ecj-sources.*'`; do | 50 | find source -name '*.java' -print0 \ |
60 | echo "building files in $list ..."; | 51 | | LC_ALL=C sort -z \ |
61 | echo jikes-initial -d build -source 1.4 -sourcepath source `cat $list`; | 52 | | xargs -0 -n25 -P ${BB_NUMBER_THREADS} \ |
62 | jikes-initial \ | 53 | jikes-initial -d build -source 1.4 -sourcepath source |
63 | -d build -source 1.4 -sourcepath source `cat $list`; | ||
64 | done | ||
65 | 54 | ||
66 | fastjar -c -C build . -f ${JAR} | 55 | fastjar -c -C build . -f ${JAR} |
67 | } | 56 | } |