mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-24 06:39:47 +00:00
Use javac -h if javah is not present
This commit is contained in:
parent
d5002f8405
commit
76a1df3b61
6 changed files with 21 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2024-02-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Documentation/gnustep-make.texi:
|
||||
* common.make:
|
||||
* messages.make:
|
||||
* rules.make:
|
||||
* target.make:
|
||||
Use 'javac -h' if 'javah' does not exist, since the separate tool was
|
||||
removed after version 8. Update comments to match the change.
|
||||
|
||||
2023-12-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* TestFramework/gnustep-tests.in: Exit if no bash available
|
||||
|
|
|
@ -268,7 +268,7 @@ specified in @code{JAVA_PACKAGE_NAME}.
|
|||
|
||||
@defvr {Java project} JAVA_JNI_FILES
|
||||
@code{xxx_JAVA_JNI_FILES} is the list of Java source code files for
|
||||
which @code{javah} should produce header files for integration with
|
||||
which @code{JAVAH} should produce header files for integration with
|
||||
Objective-C code.
|
||||
@strong{xxx} should be replaced with the name of the Java package
|
||||
specified in @code{JAVA_PACKAGE_NAME}.
|
||||
|
|
|
@ -855,9 +855,15 @@ endif
|
|||
|
||||
#
|
||||
# The java header compiler.
|
||||
# After Java 8, javah is replaced by javac with the -h flag, so if we don't
|
||||
# find the javah executable we assume we are using javac.
|
||||
#
|
||||
ifeq ($(JAVAH),)
|
||||
ifeq (, $(shell $(JAVA_HOME)/bin/javah -version 2>/dev/null))
|
||||
JAVAH = $(JAVA_HOME)/bin/javac -h
|
||||
else
|
||||
JAVAH = $(JAVA_HOME)/bin/javah
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
|
|
|
@ -44,7 +44,7 @@ ifneq ($(messages),yes)
|
|||
INSIDE_ECHO_JAVA_COMPILING = echo "Compiling file $< ...";
|
||||
INSIDE_ECHO_JAVA_BATCH_COMPILING = echo " Compiling Java files for $(GNUSTEP_INSTANCE) ...";
|
||||
ECHO_LINKING = @(echo " Linking $(GNUSTEP_TYPE) $(GNUSTEP_INSTANCE) ...";
|
||||
ECHO_JAVAHING = @(echo " Running javah on $< ...";
|
||||
ECHO_JAVAHING = @(echo " Running java header command on $< ...";
|
||||
ECHO_INSTALLING = @(echo " Installing $(GNUSTEP_TYPE) $(GNUSTEP_INSTANCE)...";
|
||||
ECHO_UNINSTALLING = @(echo " Uninstalling $(GNUSTEP_TYPE) $(GNUSTEP_INSTANCE)...";
|
||||
ECHO_COPYING_INTO_DIR = @(echo " Copying $(GNUSTEP_TYPE) $(GNUSTEP_INSTANCE) into $(COPY_INTO_DIR)...";
|
||||
|
|
|
@ -672,6 +672,8 @@ endif
|
|||
# Example of how this rule will be applied:
|
||||
# gnu/gnustep/base/NSObject.h : gnu/gnustep/base/NSObject.java
|
||||
# javah -o gnu/gnustep/base/NSObject.h gnu.gnustep.base.NSObject
|
||||
# or
|
||||
# javac -h -o gnu/gnustep/base/NSObject.h gnu.gnustep.base.NSObject
|
||||
%.h : %.java
|
||||
$(ECHO_JAVAHING)$(JAVAH) \
|
||||
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_JAVAHFLAGS)) \
|
||||
|
|
|
@ -1117,7 +1117,7 @@ SHARED_LIBEXT = .so
|
|||
HAVE_BUNDLES = yes
|
||||
BUNDLE_LD = $(LD)
|
||||
#BUNDLE_LDFLAGS += -shared -mimpure-text
|
||||
BUNDLE_LDFLAGS += -nodefaultlibs -Xlinker -Wl,-r
|
||||
BUNDLE_LDFLAGS += -nodefaultlibs -Xlinker -Wl,-r -no-pie
|
||||
endif
|
||||
|
||||
# end Unixware
|
||||
|
|
Loading…
Reference in a new issue