aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/appl/common-build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/appl/common-build.xml')
-rw-r--r--amforth-6.5/appl/common-build.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/amforth-6.5/appl/common-build.xml b/amforth-6.5/appl/common-build.xml
new file mode 100644
index 0000000..b039a5d
--- /dev/null
+++ b/amforth-6.5/appl/common-build.xml
@@ -0,0 +1,47 @@
+<!-- make multiple targets with antelope -->
+<project name="Macros and Commands for ANT" basedir="." default="Help">
+ <target name="Help" description="use ant -p for more">
+ <echo message="use ant -p for a list of available targets"/>
+ <echo message="and look at programmer.properties for available programmers"/>
+ </target>
+
+ <!-- generic target to clean up directory -->
+ <target name="clean" description="Delete all generated files" >
+ <delete verbose="true">
+ <fileset dir="." includes="*.hex"/>
+ <fileset dir="." includes="*.lst"/>
+ <fileset dir="." includes="*.obj"/>
+ <fileset dir="." includes="*.cof"/>
+ <fileset dir="." includes="*.map"/>
+ </delete>
+ </target>
+
+ <target name="build-info">
+ <tstamp>
+ <format property="touch.time" pattern="MMM dd, yyyy HH:mm:ss" locale="C"/>
+ </tstamp>
+ <length property="touch.length" string="${touch.time}"/>
+ <copy tofile="words/build-info.asm" file="../../common/words/build-info.tmpl" overwrite="true">
+ <filterset>
+ <filter token="TSTAMPLEN" value="${touch.length}"/>
+ <filter token="TSTAMP" value="${touch.time}"/>
+ </filterset>
+ </copy>
+
+ </target>
+
+ <macrodef name="git-branch">
+ <attribute name="output" />
+ <sequential>
+ <exec executable="git" outputproperty="branch" >
+ <arg value="rev-parse"/>
+ <arg value="--abbrev-ref"/>
+ <arg value="HEAD"/>
+ <env key="LANG" value="C"/>
+ </exec>
+ <property name="@{output}" value="${branch}"/>
+ </sequential>
+ </macrodef>
+
+ <loadproperties srcfile="../programmer.properties"/>
+</project>