aboutsummaryrefslogtreecommitdiffstats
path: root/make/gluegen-cpptasks.xml
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 /make/gluegen-cpptasks.xml
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.
Diffstat (limited to 'make/gluegen-cpptasks.xml')
-rwxr-xr-xmake/gluegen-cpptasks.xml26
1 files changed, 17 insertions, 9 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" />