changeset 11:14fb708ebd3e

Script for native code compilation.
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 24 Mar 2009 15:09:12 +0300
parents 187712a9c473
children 18c28b2b2f10
files .hgignore compile-native dist/tema dist/tema.sh
diffstat 4 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri Nov 07 03:35:45 2008 +0300
+++ b/.hgignore	Tue Mar 24 15:09:12 2009 +0300
@@ -5,5 +5,5 @@
 doc/manual/manual.html
 dist/*.jar
 dist/*.tar.gz
+dist/tema
 nbproject/private
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile-native	Tue Mar 24 15:09:12 2009 +0300
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Compile Tema to native code using GCJ.
+#
+
+ant compile
+
+compile_classes=$(find build -name '*.class' | grep -v tema/ant)
+
+gcj -o build/demo.template.o -c --resource kryshen/tema/demo/demo.template build/kryshen/tema/demo/demo.template
+gcj -g --main=kryshen.tema.Tema -o dist/tema dist/lib/commons-cli-1.1.jar $compile_classes build/demo.template.o
+
+rm build/demo.template.o
--- a/dist/tema	Fri Nov 07 03:35:45 2008 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-java -jar tema.jar "$@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/tema.sh	Tue Mar 24 15:09:12 2009 +0300
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -jar tema.jar "$@"