Ignore:
Timestamp:
2022-08-29T13:21:36+12:00 (3 months ago)
Author:
davidb
Message:

Changed to a more careful way of determining whether javah (used in older JDKs) should be used or not. Need to do this in a way that doesn't accidentally pick up on an older system-wide installed JDK (that has a javah), given that we use JAVA_HOME to precisely determine which java/javac that should be used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/packages/javagdbm/java/Makefile.in

    r35640 r36531  
    88# 'javah' existed until JDK 1.7, transitional in JDK 1.8, then removed by JDK 1.9 (use 'javac -h' instead)
    99# Makefile rules below test for 'javah' and use it if it found, otherwise runs with 'javac -h' version
    10 JAVAH = javah
     10#
     11# Since we're committed to JAVA_HOME being set, so jni.h header files can be found,
     12# then we can lean on JAVA_HOME here to more precisely check for the existence of javah
     13# within JAVA_HOME, and not accidentally pick up on another (older) JDK that is also
     14# installed on the system, and does come with a 'javah' but is unlikely to be able
     15# to cope with newer (e.g. JDK 11) version class files
     16JAVAH = $(JAVA_HOME)/javah
    1117JAR = jar
    1218
     
    2935    @echo Checking for javah ...
    3036#   $(eval found = $(shell which javah 2>/dev/null | wc -l))
    31     $(eval found = $(shell command -v javah | wc -l))
     37    $(eval found = $(shell command -v $(JAVAH) | wc -l))
    3238    @if test "$(found)" = "1" ; then \
    3339      echo "... found" ; \
Note: See TracChangeset for help on using the changeset viewer.