From: wisberg Date: Mon, 15 Dec 2003 12:37:08 +0000 (+0000) Subject: simple script to compile aspectjtools using ajc X-Git-Tag: mostlyLastEclipse2xTree_20040112~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=700a1a3b0cbe02993fedf1bc9598dd96fc5aab85;p=aspectj.git simple script to compile aspectjtools using ajc --- diff --git a/build/scripts/makeAspectjtoolsLstFile.sh b/build/scripts/makeAspectjtoolsLstFile.sh new file mode 100644 index 000000000..50a705db0 --- /dev/null +++ b/build/scripts/makeAspectjtoolsLstFile.sh @@ -0,0 +1,180 @@ +#!/bin/bash +# generate .lst file for aspectjtools.jar +# by compile all non-testing src dirs +# todo: copy ajbrowser manifest +[ -n "$DEBUG" ] && set -vx + +usage() { + name=`basename "$0"` + cat< aspectjtools-sources.lst; + # head aspectjtools-sources.lst +} + +genResourceJar() { # slow, but hey + [ -n "$DEBUG" ] && set -vx + jarFile=`canonicalPath "$1"` + [ -n "$jarFile" ] || exit 43 + + "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ + cfM "$jarFile" build.xml + + curDir=`pwd`; + for i in `listSourceDirs` ; do + cd "$i" + "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ + ufM "$jarFile" `find . -type f | sed '/CVS/d;/\.java/d'` + cd "$curDir" + done + cd "$curDir" + +# mf=`canonicalPath "grj_manifest.txt"` +# sed 's|@build.version.short@|1.1.1|;s|@company.name@|na|' \ +# ../ajbrowser/ajbrowser.mf.txt > "$mf" +# "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ +# ufm "$jarFile" "$mf" build.xml +# rm "$mf" +} + +addManifest() { + outjar="$1" + mf=`canonicalPath "grj_manifest.txt"` + sed 's|@build.version.short@|1.1.1|;s|@company.name@|na|' \ + ../ajbrowser/ajbrowser.mf.txt > "$mf" + echo "nothing" > am_nothing + "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ + ufm "$outjar" "$mf" am_nothing + rm "$mf" am_nothing +} + +getClasspath() { + [ -n "$DEBUG" ] && set -vx + ajrt=`canonicalPath "${ASPECTJ_HOME:-c:/home/apps/aspectj-1.1.1}/lib/aspectjrt.jar"` + echo "${ajrt};`cygpath -ma ../lib/ant/lib/ant.jar`" +} + +getInjars() { + [ -n "$DEBUG" ] && set -vx + cp="" + sep="" + for i in "$1" ../lib/bcel/bcel.jar \ + ../org.eclipse.jdt.core/jdtcore-for-aspectj.jar \ + ; do + cp="${cp}${sep}`canonicalPath "$i"`" + [ -z "${sep}" ] && sep=";" + done + echo "$cp" +} + +setupManifest() { + [ -n "$DEBUG" ] && set -vx + midir="../ajbrowser/src/META-INF" + [ -d "$midir" ] || mkdir ../ajbrowser/src/META-INF + sed 's|@build.version.short@|1.1.1|;s|@company.name@|na|' \ + ../ajbrowser/ajbrowser.mf.txt > "$1" +} + +generateFile() { + resourceJar="$1" + outputJar="$2" + [ -n "$DEBUG" ] && set -vx + [ -f "$resourceJar" ] || exit 98 + [ -n "$outputJar" ] || exit 98 + rm -f "$outputJar" + PS=";" + #sourceroots=`getSourceroots` + classpath=`getClasspath` + injars=`getInjars "$resourceJar"` + cat< aspectjtools.lst + ls -ald "$resourceJar" aspectjtools.lst +fi