summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-10 06:40:00 +0100
committerSven Gothel <[email protected]>2012-03-10 06:40:00 +0100
commite617834dcabdb83f383a2d2a82fcd2d9d987c154 (patch)
tree0326f9c274d1e23cf591595317726f3ce1a5b21c
parentcb343deee37687519103112f637a3dc60d0d97c2 (diff)
Allow GLUEGEN_CPPTASKS_FILE to be relative to gluegen.root ; Load gluegen-cpptasks-base.xml in custom files w/ gluegen.root.abs-path.
-rwxr-xr-xmake/gluegen-cpptasks.xml26
-rw-r--r--make/lib/gluegen-cpptasks-android-armv7.xml2
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv7.xml2
3 files changed, 19 insertions, 11 deletions
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
index bae7c6d..be0f8c3 100755
--- a/make/gluegen-cpptasks.xml
+++ b/make/gluegen-cpptasks.xml
@@ -12,12 +12,8 @@
-->
<project name="GlueGen-cpptasks" basedir=".">
- <condition property="gluegen.root" value="..">
- <not>
- <isset property="gluegen.root"/>
- </not>
- </condition>
-
+ <property name="gluegen.root" value=".." /> <!-- default value -->
+ <property name="gluegen.root.abs-path" location="${gluegen.root}" />
<!-- import properties -->
<import file="gluegen-properties.xml" />
@@ -27,13 +23,25 @@
<typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar"/>
<property environment="env" />
- <condition property="gluegen-cpptasks.file" value="${env.GLUEGEN_CPPTASKS_FILE}">
+ <condition property="gluegen-cpptasks.file.1" value="${env.GLUEGEN_CPPTASKS_FILE}">
<not>
<equals arg1="${env.GLUEGEN_CPPTASKS_FILE}" arg2="$${env.GLUEGEN_CPPTASKS_FILE}" casesensitive="true" />
</not>
</condition>
- <property name="gluegen-cpptasks.file" value="${gluegen.root}/make/gluegen-cpptasks-base.xml" /> <!-- default value -->
- <property name="gluegen-cpptasks.file.abs-path" location="${gluegen-cpptasks.file}" />
+ <!-- 1st check for relative location to gluegen.root -->
+ <condition property="gluegen-cpptasks.file.2"
+ value="${gluegen.root}/${gluegen-cpptasks.file}">
+ <available file="${gluegen.root}/${gluegen-cpptasks.file}"/>
+ </condition>
+ <!-- 2nd check for absolute location -->
+ <condition property="gluegen-cpptasks.file.2"
+ value="${gluegen-cpptasks.file}">
+ <available file="${gluegen-cpptasks.file}"/>
+ </condition>
+ <!-- 3rd use default value if the above is not successful -->
+ <property name="gluegen-cpptasks.file.2" value="${gluegen.root}/make/gluegen-cpptasks-base.xml" />
+
+ <property name="gluegen-cpptasks.file.abs-path" location="${gluegen-cpptasks.file.2}" />
<import file="${gluegen-cpptasks.file.abs-path}" optional="false" />
diff --git a/make/lib/gluegen-cpptasks-android-armv7.xml b/make/lib/gluegen-cpptasks-android-armv7.xml
index 13ff70e..7630595 100644
--- a/make/lib/gluegen-cpptasks-android-armv7.xml
+++ b/make/lib/gluegen-cpptasks-android-armv7.xml
@@ -28,7 +28,7 @@
<echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-android-armv7' done"/>
</target>
-<import file="../gluegen-cpptasks-base.xml" optional="false" />
+<import file="${gluegen.root.abs-path}/make/gluegen-cpptasks-base.xml" optional="false" />
<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir,declare.linux.android">
<echo message="Custom forced compiler Android NDK, linker.cfg.android" />
diff --git a/make/lib/gluegen-cpptasks-linux-armv7.xml b/make/lib/gluegen-cpptasks-linux-armv7.xml
index 09c5f9f..fad15af 100644
--- a/make/lib/gluegen-cpptasks-linux-armv7.xml
+++ b/make/lib/gluegen-cpptasks-linux-armv7.xml
@@ -28,7 +28,7 @@
<echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-armv7' done"/>
</target>
-<import file="../gluegen-cpptasks-base.xml" optional="false" />
+<import file="${gluegen.root.abs-path}/make/gluegen-cpptasks-base.xml" optional="false" />
</project>