Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 1 | NAME=javax.inject |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 2 | |
| 3 | # Clear and recreate build directory. |
| 4 | rm -r build |
| 5 | mkdir -p build/classes |
Bob Lee | eedff3d | 2009-09-28 05:31:30 +0000 | [diff] [blame] | 6 | mkdir -p build/tck |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 7 | mkdir -p build/dist |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 8 | mkdir -p build/tck/classes |
| 9 | mkdir -p build/tck/dist |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 10 | |
| 11 | # Compile classes. |
| 12 | javac -g -d build/classes `find src -name *.java` |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 13 | javac -g -classpath build/classes:lib/junit.jar -d build/tck/classes \ |
Bob Lee | eedff3d | 2009-09-28 05:31:30 +0000 | [diff] [blame] | 14 | `find tck -name *.java` |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 15 | |
Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 16 | FOOTER="<font size='-1'>Copyright (C) 2009 <a href='http://code.google.com/p/atinject/'>\ |
| 17 | The JSR-330 Expert Group</a>. \ |
| 18 | Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0'>Apache \ |
| 19 | License</a>, Version 2.0.</font>" |
| 20 | |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 21 | # Generate Javadocs. |
Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 22 | javadoc -protected -bottom "$FOOTER" \ |
| 23 | -sourcepath src -d build/javadoc javax.inject |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 24 | javadoc -classpath build/classes:lib/junit.jar -protected -bottom "$FOOTER" \ |
| 25 | -sourcepath tck -d build/tck/javadoc org.atinject.tck \ |
Bob Lee | 86a4555 | 2009-09-29 09:20:16 +0000 | [diff] [blame] | 26 | org.atinject.tck.auto org.atinject.tck.auto.accessories |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 27 | |
| 28 | # Generate jars. |
| 29 | cp -R src build |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 30 | cp -R tck build/tck/src |
| 31 | |
| 32 | rmSvn() { |
| 33 | find $1 -name .svn -type d | xargs rm -r |
| 34 | } |
| 35 | |
| 36 | rmSvn build/src |
| 37 | rmSvn build/tck/src |
| 38 | rm build/tck/src/tck.iml |
Bob Lee | eedff3d | 2009-09-28 05:31:30 +0000 | [diff] [blame] | 39 | |
Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 40 | jar cfM build/dist/$NAME-src.zip -C build/src . |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 41 | jar cfM build/tck/dist/$NAME-tck-src.zip -C build/tck/src . |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 42 | |
Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 43 | jar cfM build/dist/$NAME-javadoc.zip -C build/javadoc . |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 44 | jar cfM build/tck/dist/$NAME-tck-javadoc.zip -C build/tck/javadoc . |
Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 45 | jar cfM build/dist/$NAME.jar -C build/classes . |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 46 | jar cfM build/tck/dist/$NAME-tck.jar -C build/tck/classes . |
Bob Lee | f821943 | 2009-07-13 21:44:47 +0000 | [diff] [blame] | 47 | |
Bob Lee | 45c7a95 | 2009-09-14 03:09:36 +0000 | [diff] [blame] | 48 | jar cfM build/$NAME.zip -C build/dist . |
Bob Lee | bfc0343 | 2009-09-30 21:15:57 +0000 | [diff] [blame] | 49 | jar cfM build/$NAME-tck.zip -C build/tck/dist . |