This was(is?) called from ~/hh/extensions/modules/build.xml overriding the deploy.dir property
Depends on envvars:
EPERL_HOME PERL_CORE EXIST_HOME JAVA_INCLUDE
depends on jni-headers calls darwin-link
changes made to linux to get working on OSX
(with shared it creates a dylib)
remove the outfile attribute from cc to stop the link attempt, instead do that in separate task
On OSX, with gcc get .bundle with g++ get the .so , with gcc need to add stdc++
Commandline testing:
cd $EPERL_HOME/build/libs
java -cp EPerl.jar eperl.example.ModuleCall
java -cp $EPERL_HOME/build/libs/EPerl.jar eperl.example.ModuleCall Image::ExifTooli "print 'hello\n';"
alias jperl "cd $EPERL_HOME/build/libs ; java -cp $EPERL_HOME/build/libs/EPerl.jar -Djava.library.path=$EPERL_HOME/build/libs eperl.example.ModuleCall"
jperl "Data::Dumper" 'my $t = [1..100] ; print Dumper($t);'
Formerly when was trying to compile and link in a single task:
/usr/bin/ld: Undefined symbols: __Unwind_Resume collect2: ld returned 1 exit status
This is due to using gcc rather than g++ to link (see http://lists.apple.com/archives/xcode-users/2005/Nov/msg00707.html)
The cpptasks people are aware of this problem but have not fixed it, they think can just add stdc++
<!--linker name="g++" >
<linkerarg value="-L/usr/local/lib" />
<linkerarg value="-L${perl.CORE}"/>
<libset libs="perl,stdc++" />
<linkerarg location="end" value="${perl.CORE}/../auto/DynaLoader/DynaLoader.a"/>
</linker-->