summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsg215889 <[email protected]>2009-07-28 21:42:38 -0700
committersg215889 <[email protected]>2009-07-28 21:42:38 -0700
commit2eca2e1d82356ef3ddedd0e12cb05861beb1f513 (patch)
tree7e38a5c6f186a23f7cfd3c4e33f2701318d1eddd
parent6d07c8e77789d21cb04877360723d5364aee26ef (diff)
Proper gluegen.properties loading
-rwxr-xr-xmake/build.xml18
-rwxr-xr-xmake/gluegen-cpptasks.xml8
-rwxr-xr-xmake/gluegen-properties.xml34
3 files changed, 44 insertions, 16 deletions
diff --git a/make/build.xml b/make/build.xml
index 51aaf3d..9d56682 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -18,16 +18,7 @@
<available property="antlr.jar" file="/usr/share/java/antlr.jar"
value="/usr/share/java/antlr.jar"/>
- <target name="load.user.properties" unless="user.properties.file">
- <!-- Load the user specified properties file that defines various host
- - specific paths. The user will be notified if this is does not
- - exist. -->
- <property name="user.properties.file" value="${user.home}/gluegen.properties" />
- <property file="${user.properties.file}" />
- <echo message="Loaded ${user.properties.file}." />
- <fail message="antlr.jar was not specified in gluegen.properties. Please see README.txt for instructions" unless="antlr.jar"/>
- <echo message="antlr.jar=${antlr.jar}" />
- </target>
+ <import file="gluegen-cpptasks.xml" />
<condition property="rootrel.build" value="build">
<not>
@@ -55,7 +46,7 @@
<copy file="../src/java/com/sun/gluegen/runtime/PointerBuffer.java.javame_cdc_fp" tofile="${src.generated.java-cdc}/com/sun/gluegen/runtime/PointerBuffer.java" />
</target>
- <target name="init" depends="load.user.properties,setup-excludes-1,setup-excludes-2">
+ <target name="init" depends="gluegen.properties.load.user,setup-excludes-1,setup-excludes-2">
<!-- Declare all paths and user defined variables. -->
<property name="javac.bootclasspath-cdc.jar" value="lib/cdc_fp.jar" />
@@ -141,7 +132,6 @@
the source tree. -->
<property name="gluegen.root" value="../" />
- <import file="gluegen-cpptasks.xml" />
<target name="generate.nativelibrary.sources" depends="init" >
<!-- Define the appropriate include paths -->
<dirset id="stub.includes.fileset.windows" dir=".">
@@ -187,11 +177,11 @@
<!--
- Set up java.home.dir appropriately on all platforms.
-->
- <target name="setup.java.home.dir.nonmacosx" depends="load.user.properties" unless="isOSX">
+ <target name="setup.java.home.dir.nonmacosx" depends="gluegen.properties.load.user" unless="isOSX">
<!-- java home dir is up one directory as java.home points to '<java-install-dir>/jre' -->
<property name="java.home.dir" value="${java.home}/.." />
</target>
- <target name="setup.java.home.dir.macosx" depends="load.user.properties" if="isOSX">
+ <target name="setup.java.home.dir.macosx" depends="gluegen.properties.load.user" if="isOSX">
<property name="java.home.dir" value="/System/Library/Frameworks/JavaVM.framework/Home" />
</target>
<target name="setup.java.home.dir" depends="setup.java.home.dir.nonmacosx,setup.java.home.dir.macosx" >
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
index 5b961c9..66bc549 100755
--- a/make/gluegen-cpptasks.xml
+++ b/make/gluegen-cpptasks.xml
@@ -132,6 +132,10 @@
- &lt;msvc.manifest objdir="${obj}" dllname="gluegen-rt" /&gt;
-->
<project name="GlueGen-cpptasks" basedir=".">
+
+ <!-- import properties -->
+ <import file="gluegen-properties.xml" />
+
<!-- import cpptasks -->
<typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar"/>
@@ -139,7 +143,7 @@
<import file="${user.home}/gluegen.compiler.xml" optional="true" />
<!-- Detect OS and compiler configuration -->
- <target name="gluegen.cpptasks.detect.os.1" unless="gluegen.cpptasks.detected.os">
+ <target name="gluegen.cpptasks.detect.os.1" depends="gluegen.properties.load.user" unless="gluegen.cpptasks.detected.os">
<condition property="isOSX">
<and>
<os family="mac"/>
@@ -366,7 +370,7 @@
<target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows" unless="gluegen.cpptasks.detected.os.2">
</target>
- <target name="gluegen.cpptasks.detect.os" depends="gluegen.cpptasks.detect.os.1,gluegen.cpptasks.detect.os.2">
+ <target name="gluegen.cpptasks.detect.os" depends="gluegen.properties.load.user,gluegen.cpptasks.detect.os.1,gluegen.cpptasks.detect.os.2">
<property name="gluegen.cpptasks.detected.os" value="true" />
<property name="gluegen.cpptasks.detected.os.2" value="true" />
</target>
diff --git a/make/gluegen-properties.xml b/make/gluegen-properties.xml
new file mode 100755
index 0000000..084ce7e
--- /dev/null
+++ b/make/gluegen-properties.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - This Ant project file depends on the following properties being set
+ - externally:
+ -
+ - win32.c.compiler (required to be set on Windows):
+ - one of "vc6", "vc7", "vc8", or "mingw".
+ - c.compiler.debug:
+ - set to "true" if debug version of the compiled
+ - C code is desired.
+ - macosppc:
+ - set to "true" if ppc universal / fat binaries are desired
+ - on Mac OS X. Requires support for cross-compilation from the
+ - underlying C compiler. Note: Unsupported on Snow Leopard!
+ - macosx64:
+ - set to "true" if 64-bit universal / fat binaries are desired
+ - on Mac OS X. Requires support for cross-compilation from the
+ - underlying C compiler.
+ -
+ -->
+<project name="GlueGen-properties" basedir=".">
+
+ <target name="gluegen.properties.load.user" unless="user.properties.file">
+ <!-- Load the user specified properties file that defines various host
+ - specific paths. The user will be notified if this is does not
+ - exist. -->
+ <property name="user.properties.file" value="${user.home}/gluegen.properties" />
+ <property file="${user.properties.file}" />
+ <echo message="Loaded ${user.properties.file}." />
+ <fail message="antlr.jar was not specified in gluegen.properties. Please see README.txt for instructions" unless="antlr.jar"/>
+ <echo message="antlr.jar=${antlr.jar}" />
+ </target>
+
+</project>