diff options
author | mohawk2 <mohawk2@users.noreply.github.com> | 2018-04-06 01:24:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 01:24:08 +0100 |
commit | 2f061a4f4723e17e4a60e0cea90f94ac81be474f (patch) | |
tree | d92156f1805c9e65a88ba4dec8c99020a68699a6 | |
parent | be23801a1fbc955bb452fda49f5b88d921339499 (diff) | |
parent | 8e8fdcf45c86b56813d646a49484badfe595ad60 (diff) |
Merge pull request #7 from mperry2/master
Fix build on Cygwin
-rw-r--r-- | Java/Makefile.PL | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Java/Makefile.PL b/Java/Makefile.PL index 9457619..537f146 100644 --- a/Java/Makefile.PL +++ b/Java/Makefile.PL @@ -113,10 +113,11 @@ if ($build_jni){ # Cygwin: create gcc-compatible library wrapper for jvm.dll if ($^O eq 'cygwin') { - my $dll = File::Spec->catfile($jdk_dir, 'lib', 'libjvm.dll.a') ; - print "Creating '$dll' for cygwin.\n\n" ; - system("/usr/bin/dlltool --input-def jvm.def --kill-at --dllname jvm.dll --output-lib '$dll'") - and print "Error attempting to create '$jdk_dir/lib/libjvm.dll.a'\n" ; + my $lib = File::Spec->catfile(Cwd::cwd, 'libjvm.dll.a') ; + my $dll = File::Spec->catfile($files->{$jvm_so}->{selected}, 'jvm.dll') ; + print "Creating '$lib' for cygwin.\n\n" ; + system("/usr/bin/dlltool --kill-at --dllname jvm.dll --output-lib '$lib' '$dll'") + and print "Error attempting to create '$lib'\n" ; } print "Building with:\n" ; @@ -137,6 +138,9 @@ if ($build_jni){ ($files->{'jni.h'}->{selected}, $files->{'jni_md.h'}->{selected}) ; @main::L = map { Inline::Java::Portable::portable('SUB_FIX_MAKE_QUOTES', "-L$_") } ($files->{$jvm_lib}->{selected}) ; + if ($^O eq 'cygwin') { + push @main::L, Inline::Java::Portable::portable('SUB_FIX_MAKE_QUOTES', '-L' . Cwd::cwd); + } my $DIR = [] ; if (! defined($build_perl_interpreter)){ |