Commit 86be3f17 authored by František Haas's avatar František Haas

added disl.py to run the example

added ant target to make source distribution package - dist-tar, dist-zip
added script that tries to guess java_home directory
parent 597657be
......@@ -15,6 +15,7 @@ bin=bin
build=build
build.thread=build-thread
build.afterbootstrap=build-abs
dist=dist
extendedthread.path=${build}/extendedthread.jar
......
......@@ -48,6 +48,7 @@
</target>
<target name="compile-agent-c">
<exec executable="make" dir="${src.agent.c}/javahome" />
<exec executable="make" dir="${src.agent.c}" />
</target>
......@@ -64,6 +65,7 @@
</target>
<target name="compile-reagent">
<exec executable="make" dir="${src.reagent}/javahome" />
<exec executable="make" dir="${src.reagent}" />
</target>
......@@ -166,9 +168,16 @@
<delete dir="${build}" />
<delete dir="${build.thread}" />
<delete dir="${build.afterbootstrap}" />
<delete dir="${dist}" />
<exec executable="make" dir="${src.agent.c}/javahome">
<arg value="clean" />
</exec>
<exec executable="make" dir="${src.agent.c}">
<arg value="clean" />
</exec>
<exec executable="make" dir="${src.reagent}/javahome">
<arg value="clean" />
</exec>
<exec executable="make" dir="${src.reagent}">
<arg value="clean" />
</exec>
......@@ -179,7 +188,32 @@
<target name="javadoc" depends="package,eclipse">
<javadoc access="public" author="true" overview="doc/overview.html" classpath="build/eclipse-dynamicbypass.jar:${asm.path}" destdir="doc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="ch.usi.dag.disl.guardcontext,ch.usi.dag.disl.staticcontext,ch.usi.dag.disl.dynamiccontext,ch.usi.dag.disl.classcontext,ch.usi.dag.disl.marker,ch.usi.dag.disl.transformer,ch.usi.dag.disl.processorcontext,ch.usi.dag.disl.annotation" source="1.7" sourcefiles="src/ch/usi/dag/disl/scope/Scope.java,src/ch/usi/dag/disl/scope/ScopeImpl.java,src/ch/usi/dag/disl/DiSL.java,src/ch/usi/dag/disl/snippet/Shadow.java" sourcepath="src-test:src-agent-java:src" splitindex="true" use="true" version="true"/>
</target>
<property name="dist.excludes" value="
.classpath,
.project,
${dist}/**,
bin/**,
build/**,
src-test/**,
run**" />
<target name="dist-tar">
<mkdir dir="${dist}" />
<tar
destfile="${dist}/disl-src-${disl.version}.tar"
basedir="."
excludes="${dist.excludes}" />
</target>
<target name="dist-zip">
<mkdir dir="${dist}" />
<zip
destfile="${dist}/disl-src-${disl.version}.zip"
basedir="."
excludes="${dist.excludes}" />
</target>
<!-- *** test instrumentaion package *** -->
<target name="check-test-property">
......
This diff is collapsed.
# if there is Makefile.local file then include it
ifneq (, $(wildcard Makefile.local))
include Makefile.local
# if there is JAVA_HOME var file then include it
ifneq (, $(wildcard javahome/var))
include javahome/var
endif
BUILDDIR=../build
......
ifeq ($(OS),Windows_NT)
UNAME := Windows
ifneq (,$(findstring /cygdrive/,$(PATH)))
UNAME := Cygwin
endif
else
UNAME := $(shell uname -s)
endif
.PHONY: all, clean
all: $(UNAME)
Linux:
@./find.sh
Darwin:
@./find.sh
Windows:
@echo Windows not yet supported.
Cygwin:
@echo "Cygwin not yet supported."
clean:
@rm -f var
The Java finder works in the following order.
1. If there is a file "var.local" then it is used. It's supposed there is
JAVA_HOME specified as in the "var.local.tmpl".
2. If there is no such file then the script checks the environment for the
JAVA_HOME variable.
3. If the envorinment variable is not found the script tries to guess based on
currently prefered java compiler and derives the destination of JAVA_HOME.
#!/bin/bash
# use variable specified by the user
if [ -f "var.local" ]; then
cp -f "var.local" "var"
exit 0
fi
# use environment variable
if [ ! -z "$JAVA_HOME" ]; then
echo "JAVA_HOME="$JAVA_HOME > "var"
exit 0
fi
# guess
JAVAC=`which javac 2>/dev/null`
JH=`readlink -f ${JAVAC}`
JH=`echo ${JH%/*}`
JH=`echo ${JH%/*}`
echo "JAVA_HOME="${JH} > "var"
JAVA_HOME=/path/to/java/directory
# if there is Makefile.local file then include it
ifneq (, $(wildcard Makefile.local))
include Makefile.local
# if there is JAVA_HOME var file then include it
ifneq (, $(wildcard javahome/var))
include javahome/var
endif
BUILDDIR=../build
......@@ -59,4 +59,4 @@ debug:
debugfull:
$(MAKE) DEBUGFULL=TRUE
all: build
\ No newline at end of file
all: build
ifeq ($(OS),Windows_NT)
UNAME := Windows
ifneq (,$(findstring /cygdrive/,$(PATH)))
UNAME := Cygwin
endif
else
UNAME := $(shell uname -s)
endif
.PHONY: all, clean
all: $(UNAME)
Linux:
@./find.sh
Darwin:
@echo "Darwin is supported"
Windows:
@echo Windows not yet supported.
Cygwin:
@echo "Cygwin not yet supported."
clean:
@rm -f var
The Java finder works in the following order.
1. If there is a file "var.local" then it is used. It's supposed there is
JAVA_HOME specified as in the "var.local.tmpl".
2. If there is no such file then the script checks the environment for the
JAVA_HOME variable.
3. If the envorinment variable is not found the script tries to guess based on
currently prefered java compiler and derives the destination of JAVA_HOME.
#!/bin/bash
if [ -f "var.local" ]; then
cp -f "var.local" "var"
exit 0
fi
if [ ! -z "$JAVA_HOME" ]; then
echo "JAVA_HOME="$JAVA_HOME > "var"
exit 0
fi
JAVAC=`which javac 2>/dev/null`
JH=`readlink -f ${JAVAC}`
JH=`echo ${JH%/*}`
JH=`echo ${JH%/*}`
echo "JAVA_HOME="${JH} > "var"
JAVA_HOME=/path/to/java/directory
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