Skip to content

Commit

Permalink
update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
coolya committed Jan 28, 2014
1 parent d337077 commit 749f09c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 58 deletions.
1 change: 1 addition & 0 deletions build.properties.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mps.home=/path/to/mps
mps.platform.caches=/path/to/cache
mbeddr.github.core.home=/path/to/mbeddr.core/root
mbeddr.arduino.home=/path/to/mbeddr.arduino/root
84 changes: 35 additions & 49 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,37 @@
<project name='mbeddr.arduino' default='build'>
<property file='build.properties'/>
<path id='mps.ant.path'>
<pathelement location='${mps.home}/lib/mps-backend.jar'/>
<pathelement location='${mps.home}/lib/jdom.jar'/>
<pathelement location='${mps.home}/lib/log4j.jar'/>
<pathelement location='${mps.home}/lib/mps-core.jar'/>
</path>
<!-- validate if path properties are set in build.properties -->
<fail unless="mbeddr.github.core.home">mbeddr.github.core.home must be set in your build.properties</fail>
<fail unless="mps.platform.caches">mps.platform.caches must be set in your build.properties</fail>
<fail unless="mps.home">mps.home must be set in your build.properties</fail>

<taskdef resource='jetbrains/mps/build/ant/antlib.xml' classpathref='mps.ant.path'/>
<project name="mbeddr download and deploy plugins" default="build-languages">
<property file="build.properties"/>
<property name="plugins.folder.name" value="plugins"/>

<jvmargs id='myargs'>
<arg value='-ea'/>
<arg value='-Xss1024k'/>
<arg value='-Xmx2048m'/>
<arg value='-XX:MaxPermSize=128m'/>
<arg value='-XX:+HeapDumpOnOutOfMemoryError'/>
<arg value='-Didea.system.path=${mps.platform.caches}/system'/>
<arg value='-Didea.config.path=${mps.platform.caches}/config'/>
<arg value='-Didea.plugins.path=${mps.platform.caches}/plugins'/>
</jvmargs>

<target name="build">
<antcall target="build-languages"/>
<antcall target="build-solutions"/>
</target>

<target name='build-languages'>
<mps.generate parallelMode='true' fork='true'>
<jvmargs refid='myargs'/>
<project file='mbeddr.arduino.mpr'/>
<modules dir='./languages'/>
<library name="mbeddr"
dir="${mbeddr.github.core.home}/code/languages"/>
</mps.generate>
</target>
<target name='build-solutions'>
<mps.generate parallelMode='true' fork='true'>
<jvmargs refid='myargs'/>
<project file='mbeddr.arduino.mpr'/>
<modules dir='./solutions'/>
<library name="mbeddr.arduino" dir="./languages"/>
<library name="mbeddr"
dir="${mbeddr.github.core.home}/code/languages"/>
</mps.generate>
<!-- mbeddr.platform -->
<property name="mbeddr.arduino.build-path.postfix" value="${mbeddr.arduino.home}build/build/artifacts/mbeddr.arduino" />
<property name="mbeddr.arduino.build-file.location" value="${mbeddr.arduino.home}/build/" />
<property name="mbeddr.arduino.build-file.name" value="build.xml" />
<property name="mbeddr.arduino.working-dir" value="${mbeddr.arduino.home}" />
<!-- misc -->
<property name="clean-generated-code.task" value="cleanSources" />
<property name="clean-plugins.task" value="clean" />
<property name="generate-code.task" value="generate" />
<property name="build-plugin.task" value="assemble" />
<property name="run-tests.task" value="check" />
<!-- validations -->
<fail unless="mps.home">mps.home must be set in your build.properties</fail>
<fail unless="mbeddr.github.core.home">mbeddr.github.core.home must be set in your build.properties</fail>
<fail unless="mbeddr.arduino.home">mbeddr.arduino.home must be set in your build.properties</fail>
<fail message="Your MPS installation (${mps.home}) doesn't contain a ${plugins.folder.name} folder">
<condition>
<not>
<resourcecount count="1">
<dirset dir="${mps.home}" >
<include name="${plugins.folder.name}"/>
</dirset>
</resourcecount>
</not>
</condition>
</fail>
<target name="build-arduino">
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${clean-plugins.task}" />
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${clean-generated-code.task}" />
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${generate-code.task}" />
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${build-plugin.task}" />
</target>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@
</node>
</node>
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063305125" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.home" />
<property name="name" nameId="tpck.1169194664001" value="mbeddr.hombeddr.github.core.home" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceProjectRelativePath" typeId="3ior.5481553824944787378" id="8043765019063305135" nodeInfo="ng">
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063305138" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value=".." />
Expand All @@ -683,7 +683,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063305158" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mebddr.core.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063305171" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063305175" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063305179" nodeInfo="nn">
Expand All @@ -704,7 +704,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063310404" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.comp.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063310448" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063310450" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063310454" nodeInfo="nn">
Expand All @@ -725,7 +725,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063311540" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.statemachines.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063311591" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063311593" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063311597" nodeInfo="nn">
Expand All @@ -746,7 +746,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063341618" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.statemachines.comp.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063344625" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063344777" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063344931" nodeInfo="nn">
Expand All @@ -767,7 +767,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063356052" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.mpsutil.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063359216" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063359318" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063360324" nodeInfo="nn">
Expand All @@ -788,7 +788,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063369848" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.platform.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063371919" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063371921" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063372127" nodeInfo="nn">
Expand All @@ -809,7 +809,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063380970" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.spawner.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063383048" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063383050" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063383054" nodeInfo="nn">
Expand All @@ -830,7 +830,7 @@
<node role="macros" roleId="3ior.5617550519002745378" type="3ior.BuildFolderMacro" typeId="3ior.7389400916848136194" id="8043765019063391895" nodeInfo="ng">
<property name="name" nameId="tpck.1169194664001" value="mbeddr.debugger.artifacts" />
<node role="defaultPath" roleId="3ior.7389400916848144618" type="3ior.BuildSourceMacroRelativePath" typeId="3ior.7389400916848153117" id="8043765019063393530" nodeInfo="ng">
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.home" />
<link role="macro" roleId="3ior.7389400916848153130" targetNodeId="8043765019063305125" resolveInfo="mbeddr.hombeddr.github.core.home" />
<node role="compositePart" roleId="3ior.7321017245477039051" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063393532" nodeInfo="nn">
<property name="head" nameId="3ior.8618885170173601779" value="build" />
<node role="tail" roleId="3ior.8618885170173601778" type="3ior.BuildCompositePath" typeId="3ior.8618885170173601777" id="8043765019063393536" nodeInfo="nn">
Expand Down

0 comments on commit 749f09c

Please sign in to comment.