diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-09-24 19:39:46 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-09-24 19:39:46 +0000 |
commit | ffdc33ee9f98213b0206cbbd8496ec3b48ae1c8f (patch) | |
tree | b83355fd177bb16b3309ba991b02d2815c42d7c1 /packages/ecj/libecj-bootstrap.inc | |
parent | 4f7b18b2325b460f224f13ad1f562ee4489e9e56 (diff) | |
parent | 1afd7b0bd9371f8bb52f7f63edcbca4e4e2af998 (diff) |
merge of '2e75cbd37f40c36e60bc1e60a02e967304b6b338'
and '887e1a4016c96ca69eca2047591511a955459515'
Diffstat (limited to 'packages/ecj/libecj-bootstrap.inc')
-rw-r--r-- | packages/ecj/libecj-bootstrap.inc | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/packages/ecj/libecj-bootstrap.inc b/packages/ecj/libecj-bootstrap.inc new file mode 100644 index 0000000000..c24c1af5ca --- /dev/null +++ b/packages/ecj/libecj-bootstrap.inc @@ -0,0 +1,67 @@ +# This package compiles and stages only the Jar. + +DESCRIPTION = "JDT Core Batch Compiler - Jar only" +HOMEPAGE = "http://www.eclipse.org/" +LICENSE = "EPL" + +DEPENDS = "fastjar-native jikes-initial virtual/java-initial" + +inherit native java + +S = "${WORKDIR}" + +JAR = "ecj-bootstrap-${PV}.jar" + +do_unpackpost() { + if [ ! -d source ]; then + mkdir source + fi + + if [ ! -d build ]; then + mkdir build + fi + + # Remove crap. + rm about.html build.xml + rm -rf META-INF + + # Move source into separate subdir. + mv org source/ + + # Remove stuff unneeded for the bootstrap compiler. + rm -rf source/org/eclipse/jdt/internal/compiler/apt + rm -rf source/org/eclipse/jdt/internal/compiler/tool + rm -rf source/org/eclipse/jdt/internal/antadapter + rm source/org/eclipse/jdt/core/JDTCompilerAdapter.java + + # Make a copy of the remaining source to get the embedded + # resources. + cp -r source/org build/ + + # Remove source code and other stuff. + find build -name '*.java' -exec rm -f {} \; + find build -name '*.html' -exec rm -f {} \; +} + +addtask unpackpost after do_unpack before do_patch + +do_compile() { + find source -name '*.java' > sourcefiles + split -l 25 sourcefiles ecj-sources. + + # Compiling in place is done because the sources contain + # property files which need to be available at runtime. + for list in `find . -name 'ecj-sources.*'`; do + echo "building files in $list ..."; + echo jikes-initial -d build -source 1.4 -sourcepath source `cat $list`; + jikes-initial \ + -d build -source 1.4 -sourcepath source `cat $list`; + done + + fastjar -c -C build . -f ${JAR} +} + +do_stage() { + oe_jarinstall -s ${JAR} ecj-bootstrap.jar +} + |