Commit 1b87bfbd authored by Lukáš Marek's avatar Lukáš Marek

additional improvements in building

parent ffdfe561
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-javaagent"/>
<classpathentry kind="src" path="src-agent-java"/>
<classpathentry kind="src" path="src-test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/asm-debug-all-4.0.jar"/>
......
......@@ -4,6 +4,7 @@ src.disl=src
src.dynbypass=src-dynbypass
src.dynbypass.act=src-dynbypass-act
src.agent.java=src-agent-java
src.test=src-test
bin=bin
build=build
......
......@@ -11,14 +11,14 @@
<!-- it automatically compiles all other necessary stuff :) -->
<target name="compile-tlvinserter">
<mkdir dir="${bin}"/>
<javac srcdir="${src.disl}" includes="ch/usi/dag/disl/tlvinserter/" destdir="${bin}" debug="true" includeAntRuntime="false">
<javac srcdir="${src.disl}" includes="ch/usi/dag/disl/utilinstr/tlvinserter/" destdir="${bin}" debug="true" includeAntRuntime="false">
<classpath refid="buildpath"/>
</javac>
</target>
<target name="prepare-extendedthread" depends="compile-tlvinserter">
<mkdir dir="bin-thread/java/lang"/>
<java fork="true" classname="ch.usi.dag.disl.tlvinserter.ExtendThread">
<java fork="true" classname="ch.usi.dag.disl.utilinstr.tlvinserter.ExtendThread">
<classpath refid="buildpath"/>
</java>
<mkdir dir="${build}"/>
......@@ -41,21 +41,52 @@
</javac>
</target>
<target name="compile" depends="compile-disl"/>
<target name="compile-agent-java" depends="compile-dynamicbypass">
<javac srcdir="${src.agent.java}" destdir="${bin}" debug="true" includeAntRuntime="false">
<classpath refid="buildpath"/>
</javac>
</target>
<target name="compile-test" depends="compile-disl">
<javac srcdir="${src.test}" destdir="bin" debug="true" includeAntRuntime="false">
<classpath refid="buildpath"/>
</javac>
</target>
<target name="compile" depends="compile-disl,compile-agent-java,compile-test"/>
<target name="prepare-dynamicbypass-afterbootstrap"/>
<target name="package-dislserver" depends="compile-disl,prepare-dynamicbypass-afterbootstrap">
<jar basedir="${bin}" destfile="${build}/disl-${disl.version}.jar">
<manifest>
<attribute name="Class-Path" value="${instr.jar.name}"/>
</manifest>
</jar>
</target>
<target name="package" depends="compile,prepare-dynamicbypass-afterbootstrap">
<jar basedir="${bin}" destfile="${build}/disl-${disl.version}.jar">
<manifest>
<manifest>
<attribute name="Class-Path" value="${instr.jar.name}"/>
</manifest>
</jar>
</target>
<target name="eclipse-agent" description="creates simple agent jar file for eclipse" >
<mkdir dir="build"/>
<jar jarfile="build/eclipse-agent.jar">
<manifest>
<attribute name="Premain-Class" value="ch.usi.dag.disl.testtools.agent.Agent"/>
</manifest>
</jar>
</target>
<target name="eclipse" depends="compile-dynamicbypass">
<target name="eclipse-dynamicbypass" depends="compile-dynamicbypass" description="creates support library for DiSL development under eclipse">
<jar basedir="${bin}" destfile="${build}/eclipse-dynamicbypass.jar" includes="ch/usi/dag/disl/dynamicbypass/" />
</target>
<target name="eclipse" depends="eclipse-dynamicbypass,eclipse-agent"/>
<target name="clean">
<delete dir="${bin}"/>
......
......@@ -7,7 +7,7 @@ public class Agent {
// INSTRUCTIONS: run ant agent
// under Eclipse create runner for desired target class
// add these jvm parameters (example)
// -javaagent:test/build/agent-light.jar
// -javaagent:build/eclipse-agent.jar
// -Ddisl.classes=bin/ch/usi/dag/disl/test/bodymarker/DiSLClass.class
/**
......
......@@ -20,7 +20,6 @@ import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.cbloader.ClassByteLoader;
import ch.usi.dag.disl.classparser.ClassParser;
import ch.usi.dag.disl.dynamicbypass.CodeMerger;
import ch.usi.dag.disl.exception.DiSLException;
import ch.usi.dag.disl.exception.DiSLFatalException;
import ch.usi.dag.disl.exception.DiSLIOException;
......@@ -40,7 +39,8 @@ import ch.usi.dag.disl.processor.generator.ProcMethodInstance;
import ch.usi.dag.disl.snippet.Shadow;
import ch.usi.dag.disl.snippet.Snippet;
import ch.usi.dag.disl.staticcontext.generator.SCGenerator;
import ch.usi.dag.disl.tlvinserter.TLVInserter;
import ch.usi.dag.disl.utilinstr.codemerger.CodeMerger;
import ch.usi.dag.disl.utilinstr.tlvinserter.TLVInserter;
import ch.usi.dag.disl.weaver.Weaver;
// TODO javadoc comment all
......
package ch.usi.dag.disl.dynamicbypass;
package ch.usi.dag.disl.utilinstr.codemerger;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
......@@ -9,6 +9,8 @@ import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.dynamicbypass.DynamicBypassCheck;
public abstract class CodeMerger {
private static final String METHOD_FINALIZE = "finalize";
......
package ch.usi.dag.disl.tlvinserter;
package ch.usi.dag.disl.utilinstr.tlvinserter;
import java.io.FileOutputStream;
import java.io.IOException;
......
package ch.usi.dag.disl.tlvinserter;
package ch.usi.dag.disl.utilinstr.tlvinserter;
import java.util.Set;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment