Conditioning basic properties ...
the 'apple' and 'local' base directories are located differently
on different platforms and, in particular, "NEXT_ROOT" is not used on
Mac OS X. By default:
'Apple' frameworks live at "/System/Library/Frameworks/..."
'Local' frameworks live at "/Library/Frameworks/...
I'm not familiar with the Windows layout, but Solaris uses
"NEXT_ROOT" == /opt/Apple and:
'Apple' frameworks live at "/opt/Apple/Library/Frameworks/..."
'Local' frameworks live at "/opt/Apple/Local/Library/Frameworks/...
so, while on Solaris you can derive the 'local' by inserting
"/Local" into the 'apple' string, you cannot do this on Mac OS X.
what I did was to be sneaky:
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -->
<target name="MacOSX" description="set isMacOSX conditional">
<condition property="isMacOSX"><os family="unix" /></condition></target>
<target name="Windows" description="set isWindows conditional">
<condition property="isWindows"><os family="windows"
/></condition></target>
<target name="condMacOSX" if="isMacOSX" depends="MacOSX"
description="set Mac OS X properties">
<echo message="is Mac OS X ..." />
<property name="apple_root" value="/System" />
<property name="local_root" value="" /></target>
<target name="condWindows" if="isWindows" depends="Windows"
description="set Windows properties">
<echo message="is Windows ..." />
<property environment="env" />
<property name="apple_root" value="${env.NEXT_ROOT}" />
<property name="local_root" value="${apple_root}/Local" /></target>
<target name="init" depends="condWindows,condMacOSX" unless="init"
description="initialize properties">
<tstamp><format property="timestamp" pattern="MMMdd/yy HH:mm" /></tstamp>
<property name="wo.localroot" value="${local_root}" />
<property name="apple_frwk_dir" value="${apple_root}/Library/Frameworks" />
<property name="local_frwk_dir" value="${local_root}/Library/Frameworks" />
<property name="apache_doc_dir"
value="/Library/WebServer/Documents/WebObjects/Applications"/>
<property name="builder_temp" value="build-ant" />
<property name="classes_temp" value="/tmp/Classes" /></target>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -->
this prepares the various property values conditionally, there may
be an easier way, ant is also brand new to me!
This archive was generated by hypermail 2.0.0 : Tue Jul 23 2002 - 22:35:18 EDT