Merge branch 'sigar-1.6'
This commit is contained in:
commit
7c94ba7164
|
@ -54,15 +54,6 @@ USA.
|
|||
<condition property="jni.javahome" value="${env.JAVA_HOME}">
|
||||
<isset property="env.JAVA_HOME"/>
|
||||
</condition>
|
||||
<condition property="jni.javahome" value="${java.home}">
|
||||
<not>
|
||||
<isset property="jni.javahome"/>
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<echo>java.home=${jni.javahome}</echo>
|
||||
|
||||
<checksum file="${jni.javahome}/include/jni.h" property="jni.md5"/>
|
||||
|
||||
<condition property="linux">
|
||||
<equals arg1="${os.name}" arg2="Linux"/>
|
||||
|
@ -180,6 +171,10 @@ USA.
|
|||
|
||||
<libarch/>
|
||||
|
||||
<echo>java.home=${jni.javahome}</echo>
|
||||
|
||||
<checksum file="${jni.javahome}/include/jni.h" property="jni.md5"/>
|
||||
|
||||
<property name="jni.project.archname"
|
||||
value="${project.name}-${jni.libarch}"/>
|
||||
|
||||
|
|
|
@ -138,6 +138,17 @@ public class ArchNameTask extends Task {
|
|||
}
|
||||
}
|
||||
getProject().setProperty("jni.scmrev", getSourceRevision());
|
||||
|
||||
//jni.javahome required to find include/jni.h
|
||||
String home = getProject().getProperty("jni.javahome");
|
||||
if (home == null) {
|
||||
home = System.getProperty("java.home");
|
||||
}
|
||||
File dir = new File(home);
|
||||
if (!new File(dir, "include").exists()) {
|
||||
dir = dir.getParentFile(); //was /jre
|
||||
}
|
||||
getProject().setProperty("jni.javahome", dir.getPath());
|
||||
}
|
||||
|
||||
//XXX source rev stuff should be in another task
|
||||
|
|
Loading…
Reference in New Issue