harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Deakin <oliver.dea...@googlemail.com>
Subject [classlib][build] Need depends.properties to be in ASCII on non-ASCII platforms
Date Wed, 20 May 2009 14:53:05 GMT
Hi all,

I have an issue building on z/OS - a fresh checkout from svn gives us 
depends.properties in the default platform encoding (EBCDIC). However, 
when we come to load these properties in depends-common.xml, using the 
loadproperties Ant task, they are assumed to be in ASCII encoding. The 
"encoding" property of the Ant task does not actually work correctly (I 
think this is a bug in Ant which I intend to raise) so it is no help. I 
was wondering if anybody has any ideas about the best way to tackle this 
problem? Really I'd like to tag the file in some way so that it is 
checked out of Subversion in the correct encoding immediately, but there 
does not seem to be a way to do this. I have come up with a few options:

1) Mark the file binary in svn - not a good solution, means losing 
revision history, not getting proper diffs etc.
2) Use the Ant copy task with it's outputencoding property set to 
ISO-8859-1 to copy the file to another location, and then use that copy 
to load the properties from. Delete the file after it has been used 
(patch would be like [1]). Unfortunately this means that when we run the 
fetch-depends target we see a lot of copy/delete output (setting 
verbose="false" for these tasks does not seem to hide the output 
3) Same as (2), but don't delete the file afterwards. There would only 
be one initial copy, then no further copies unless the file is modified. 
However, this does mean that these is an extra file left in the make 
directory, which I don't like the idea of.

I'd choose to go with (2), but thought I'd see if anyone has any other 
ideas before I commit the change.


Index: depends-common.xml
--- depends-common.xml    (revision 775934)
+++ depends-common.xml    (working copy)
@@ -25,7 +25,8 @@
     where possible.
-    <loadproperties srcfile="${basedir}/make/depends.properties">
+    <copy file="${basedir}/make/depends.properties" 
outputencoding="ISO-8859-1" />
+    <loadproperties srcfile="${basedir}/make/depends.properties.ascii" 
             <param type="token" name="${hy.arch}" value=""/>
@@ -34,7 +35,8 @@
             <param type="token" name="${hy.platform.variant}" value=""/>
-    </loadproperties>
+    </loadproperties>
+    <delete file="${basedir}/make/depends.properties.ascii" />
     <macrodef name="download-one-file">
         <attribute name="src" />

Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

View raw message