Changeset 33921

Show
Ignore:
Timestamp:
14.02.2020 18:11:22 (4 days ago)
Author:
davidb
Message:

Newer Java's don't have 'javah' any more. The functionality has been rolled into javac. MG/MG++ JNI Makefile updated to test for existence of javah and use it if it finds it, otherwise runs a 'javac -h' command

Location:
main/trunk/greenstone2/common-src/indexers
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mg/java/org/greenstone/mg/Makefile.in

    r25147 r33921  
    4747    mkdir -p $(JAVACLASSDIR) 
    4848 
    49 compile: setup 
     49compilePreJDK8: setup 
    5050    "$(JAVAC)" $(JAVACFLAGS) -d "$(JAVACLASSDIR)" -sourcepath "$(JAVASRCDIR)" $(JAVACOPTIONS) *.java 
    5151    "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGHOME)/jni" org.greenstone.mg.MGWrapper 
    5252    "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGHOME)/jni" org.greenstone.mg.MGPassesWrapper 
    5353    "$(JAR)" cf "$(MGHOME)/mg.jar" -C "$(JAVACLASSDIR)" org 
     54 
     55compile: setup 
     56    "$(JAVAC)" $(JAVACFLAGS) -d "$(JAVACLASSDIR)" -sourcepath "$(JAVASRCDIR)" $(JAVACOPTIONS) *.java  
     57    if test `javah -version >/dev/null 2>&1 ; echo $?` = 0 ; then \ 
     58      "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGHOME)/jni" org.greenstone.mg.MGWrapper ; \ 
     59      "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGHOME)/jni" org.greenstone.mg.MGPassesWrapper ; \ 
     60    else \ 
     61      "$(JAVAC)" -classpath "$(JAVACLASSPATH)" -h "$(MGHOME)/jni" MGWrapper.java ; \ 
     62      "$(JAVAC)" -classpath "$(JAVACLASSPATH)" -h "$(MGHOME)/jni" MGPassesWrapper.java ; \ 
     63    fi   
     64    "$(JAR)" cf "$(MGHOME)/mg.jar" -C "$(JAVACLASSDIR)" org 
     65 
     66 
    5467 
    5568clean: 
  • main/trunk/greenstone2/common-src/indexers/mgpp/java/org/greenstone/mgpp/Makefile.in

    r28370 r33921  
    5151    mkdir -p $(JAVACLASSDIR) 
    5252 
    53 compile: setup 
     53compilePreJDK8: setup 
    5454    "$(JAVAC)" $(JAVACFLAGS) -d "$(JAVACLASSDIR)" -sourcepath "$(JAVASRCDIR)" $(JAVACOPTIONS) *.java 
    5555    "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGPPHOME)/jni" org.greenstone.mgpp.MGPPPassesWrapper 
     
    5858    "$(JAR)" cf "$(MGPPHOME)/mgpp.jar" -C "$(JAVACLASSDIR)" org 
    5959 
     60compile: setup 
     61    "$(JAVAC)" $(JAVACFLAGS) -d "$(JAVACLASSDIR)" -sourcepath "$(JAVASRCDIR)" $(JAVACOPTIONS) *.java 
     62    if test `javah -version >/dev/null 2>&1 ; echo $?` = 0 ; then \ 
     63      "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGPPHOME)/jni" org.greenstone.mgpp.MGPPPassesWrapper ; \ 
     64      "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGPPHOME)/jni" org.greenstone.mgpp.MGPPSearchWrapper ; \ 
     65      "$(JAVAH)" -classpath "$(JAVACLASSPATH)" -d "$(MGPPHOME)/jni" org.greenstone.mgpp.MGPPRetrieveWrapper ; \ 
     66    else \ 
     67      "$(JAVAC)" -classpath "$(JAVACLASSPATH)" -h "$(MGPPHOME)/jni" MGPPPassesWrapper.java ; \ 
     68      "$(JAVAC)" -classpath "$(JAVACLASSPATH)" -h "$(MGPPHOME)/jni" MGPPSearchWrapper.java ; \ 
     69      "$(JAVAC)" -classpath "$(JAVACLASSPATH)" -h "$(MGPPHOME)/jni" MGPPRetrieveWrapper.java ; \ 
     70    fi 
     71    "$(JAR)" cf "$(MGPPHOME)/mgpp.jar" -C "$(JAVACLASSDIR)" org 
    6072clean: 
    6173    rm -rf "$(JAVACLASSDIR)" "$(MGPPHOME)/mgpp.jar" "$(MGPPHOME)/jni/org_greenstone_mgpp_MGPPSearchWrapper.h" "$(MGPPHOME)/jni/org_greenstone_mgpp_MGPPRetrieveWrapper.h" "$(MGPPHOME)/jni/org_greenstone_mgpp_MGPPPassesWrapper.h"