Skip to content

Commit

Permalink
Merge pull request #6 from icsi-berkeley/token-tool
Browse files Browse the repository at this point in the history
Token and morph tool updates
  • Loading branch information
vivekraghuram authored May 14, 2018
2 parents 1505b2b + 770acc5 commit ef1e8c0
Show file tree
Hide file tree
Showing 18 changed files with 2,733 additions and 64 deletions.
201 changes: 201 additions & 0 deletions JFlex/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="JFlex" default="build.jars" basedir=".">

<property name="p2.build.repo" value="file:${buildDirectory}/buildRepo"/>
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<property name="bundleId" value="JFlex"/>
<property name="bundleVersion" value="1.4.1.201804141949"/>
<property name="p2.publishonerror" value="false"/>

<!-- Compiler settings. -->
<property name="javacFailOnError" value="false"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="false"/>
<property name="logExtension" value=".log"/>
<property name="compilerArg" value=""/>
<property name="compilation.prereq.log" value="${buildDirectory}/prereqErrors.log"/>
<property name="javacSource" value="1.3"/>
<property name="javacTarget" value="1.2"/>
<condition property="dir_bootclasspath" value="${java.home}/../Classes">
<and>
<os family="mac"/>
<available file="${java.home}/../Classes" type="dir"/>
</and>
</condition>
<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<condition property="bundleBootClasspath" value="${JavaSE-1.8}" >
<isset property="JavaSE-1.8"/>
</condition>
<condition property="bundleJavacSource" value="1.8" >
<isset property="JavaSE-1.8"/>
</condition>
<condition property="bundleJavacTarget" value="1.8" >
<isset property="JavaSE-1.8"/>
</condition>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>

<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins" >
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/JFlex_1.4.1.201804141949" >
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
<condition property="p2.publish.parts" value="true" >
<istrue value="${p2.gathering}"/>
</condition>
<property name="compilation.problem.marker" value="${build.result.folder}/compilation.problem"/>
<condition property="compilation.problem.marker.exists" value="true" >
<and>
<available file="${compilation.problem.marker}"/>
<isfalse value="${p2.publishonerror}"/>
</and>
</condition>
</target>

<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>

</target>

<target name="build.update.jar" depends="init" description="Build the plug-in: JFlex for an update site.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<jar destfile="${plugin.destination}/JFlex_1.4.1.201804141949.jar" basedir="${temp.folder}/JFlex_1.4.1.201804141949" filesetmanifest="merge"/>
<delete dir="${temp.folder}"/>
</target>

<target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: JFlex.">
<delete file="${compilation.problem.marker}" quiet="true"/>
</target>

<target name="checkCompilationResults" if="compilation.error.occured">
<echo file="${compilation.problem.marker}" message="JFlex_1.4.1.201804141949${line.separator}compilation.error.occured=${compilation.error.occured}"/>
<eclipse.logCompileError log="${compilation.prereq.log}" bundle="JFlex_1.4.1.201804141949">
</eclipse.logCompileError>
</target>

<target name="build.sources" depends="init">
</target>

<target name="publish.bin.parts" depends="init" if="p2.publish.parts" unless="compilation.problem.marker.exists">
<mkdir dir="${build.result.folder}/JFlex_1.4.1.201804141949"/>
<copy todir="${build.result.folder}" failonerror="true" overwrite="true">
<fileset dir="${basedir}">
<include name="META-INF/MANIFEST.MF"/>
<include name="plugin.xml"/>
<include name="fragment.xml"/>
</fileset>
</copy>
<eclipse.versionReplacer path="${build.result.folder}" version="1.4.1.201804141949"/>
<antcall target="apitools.generation">
<param name="projectLocation" value="${basedir}"/>
<param name="binary.folders" value="/Users/vivek/Projects/compling/JFlex"/>
<param name="projectName" value="${bundleId}_${bundleVersion}"/>
<param name="target.folder" value="${build.result.folder}"/>
</antcall>
<eclipse.gatherBundle
metadataRepository="${p2.build.repo}"
artifactRepository="${p2.build.repo}"
buildResultFolder="${build.result.folder}"
unpack="false"
baseDirectory="${basedir}"
/>
</target>

<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/JFlex_1.4.1.201804141949"/>
<copy todir="${destination.temp.folder}/JFlex_1.4.1.201804141949" failonerror="true" overwrite="true">
<fileset dir="${basedir}">
<include name="META-INF/"/>
<include name="JFlex/"/>
<include name="java_cup/"/>
<include name="."/>
</fileset>
</copy>
<eclipse.versionReplacer path="${destination.temp.folder}/JFlex_1.4.1.201804141949" version="1.4.1.201804141949"/>
<antcall target="apitools.generation">
<param name="projectLocation" value="${basedir}"/>
<param name="binary.folders" value="/Users/vivek/Projects/compling/JFlex"/>
<param name="projectName" value="${bundleId}_${bundleVersion}"/>
<param name="target.folder" value="${destination.temp.folder}/JFlex_1.4.1.201804141949"/>
</antcall>
</target>

<target name="build.zips" depends="init">
</target>

<target name="gather.sources" depends="init" if="destination.temp.folder">
<antcall target="copy.src.includes">
<param name="source.destination.folder" value="${destination.temp.folder}/JFlex_1.4.1.201804141949"/>
</antcall>
</target>

<target name="gather.individual.sources" depends="init">
<antcall target="copy.src.includes">
<param name="source.destination.folder" value="${destination.temp.folder}"/>
</antcall>
</target>

<target name="copy.src.includes" depends="init">
</target>

<target name="gather.logs" depends="init" if="destination.temp.folder">
</target>

<target name="clean" depends="init" description="Clean the plug-in: JFlex of all the zips, jars and logs created.">
<delete file="${plugin.destination}/JFlex_1.4.1.201804141949.jar"/>
<delete file="${plugin.destination}/JFlex_1.4.1.201804141949.zip"/>
<delete dir="${temp.folder}"/>
<delete file="${compilation.problem.marker}" quiet="true"/>
</target>

<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
<eclipse.convertPath fileSystemPath="/Users/vivek/Projects/compling/JFlex" property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
</target>

<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: JFlex.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="build.sources"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<antcall target="gather.sources">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<delete>
<fileset dir="${temp.folder}">
<include name="**/*.bin${logExtension}"/>
</fileset>
</delete>
<zip destfile="${plugin.destination}/JFlex_1.4.1.201804141949.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
<delete dir="${temp.folder}"/>
</target>

<target name="apitools.generation" if="generateAPIDescription">
<apitooling.apigeneration projectName="${projectName}" project="${projectLocation}" binary="${binary.folders}" target="${target.folder}" extramanifests="${extraManifests}" allownonapiproject="${allowNonApiProject}" />
</target>

</project>
Loading

0 comments on commit ef1e8c0

Please sign in to comment.