This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Kawa on Android - unable to use 'for-each' form


Got it!  The problem is indeed in the Java pre-processing.

The issue is that when I got the sources from SVN, svn automatically
converted line endings to Windows line endings.  However, the logic in
gnu/kawa/util/PreProcess.java appears to have been written with Unix
line endings in mind, leading to the pre-processing misbehaving on my
system.  The sources you sent worked because they retained Unix line
endings.

My work-around was to fire up cygwin and run the following command in
the kawa directory to convert Java files back to Unix line endings.

"dos2unix -U $(find . -name "*.java")"

Using this method, I was able to compile the latest SVN sources into a
jar that let me compile and run Android activity with "for-each" form.
 This worked for both Android SDK r6 targeting Android 2.2 and Android
SDK r10 targeting Android 2.3.3.

Thank you very much for your help, Per.

On Sat, Mar 19, 2011 at 1:35 AM, Per Bothner <per@bothner.com> wrote:
> On 03/19/2011 12:22 AM, Benny Tsai wrote:
>>
>> Comparing the two diffs, there are 5 java files that were
>> pre-processed by ant in the 1.11.1 version but not the SVN version.
>
> Maybe it's worth looking at the build.selectjava fileset definition
> in Kawa's build.xml.
>
> This seems strange:
> ? <contains text=" #endif " casesensitive="true"/>
>
> Why the extra spaces in " #endif "?
>
> (IIRC I didn't write this part of build.xml.)
> --
> ? ? ? ?--Per Bothner
> per@bothner.com ? http://per.bothner.com/
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]