mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Updated java-tool.make for new filesystem structure
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24569 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
22896d184e
commit
817e8d99b2
3 changed files with 26 additions and 65 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* Instance/java-tool.make: Store Java code in the standard
|
||||
GNUSTEP_JAVA location instead of a subdirectory of GNUSTEP_TOOLS.
|
||||
* java-executable.template: Corresponding update. Simplify
|
||||
and update by sourcing GNUstep.sh.
|
||||
|
||||
2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* gnustep-config.in: Extended help to list all the new
|
||||
|
|
|
@ -39,13 +39,20 @@ endif
|
|||
internal-java_tool-uninstall_ \
|
||||
_FORCE
|
||||
|
||||
# This is the directory where the tools get installed. If you don't specify a
|
||||
# directory they will get installed in $(GNUSTEP_LOCAL_ROOT)/Tools/.
|
||||
# This is the directory where the shell wrapper gets installed. You
|
||||
# want this on your path! If you don't specify a directory they will
|
||||
# get installed in $(GNUSTEP_LOCAL_ROOT)/Tools/.
|
||||
ifeq ($(JAVA_TOOL_INSTALLATION_DIR),)
|
||||
JAVA_TOOL_INSTALLATION_DIR = $(GNUSTEP_TOOLS)
|
||||
JAVA_TOOL_INSTALLATION_DIR = $(GNUSTEP_TOOLS)
|
||||
endif
|
||||
|
||||
GNUSTEP_SHARED_JAVA_INSTALLATION_DIR = $(JAVA_TOOL_INSTALLATION_DIR)/Java
|
||||
# This is the directory where the java classes get installed.
|
||||
# Normally this is /usr/GNUstep/Local/Library/Libraries/Java/
|
||||
ifeq ($(JAVA_INSTALLATION_DIR),)
|
||||
JAVA_INSTALLATION_DIR = $(GNUSTEP_JAVA)
|
||||
endif
|
||||
|
||||
GNUSTEP_SHARED_JAVA_INSTALLATION_DIR = $(JAVA_INSTALLATION_DIR)
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/Shared/java.make
|
||||
|
||||
internal-java_tool-all_:: shared-instance-java-all
|
||||
|
@ -56,8 +63,9 @@ internal-java_tool-install_:: shared-instance-java-install \
|
|||
PRINCIPAL_CLASS = $(strip $($(GNUSTEP_INSTANCE)_PRINCIPAL_CLASS))
|
||||
|
||||
ifeq ($(PRINCIPAL_CLASS),)
|
||||
$(warning You must specify PRINCIPAL_CLASS)
|
||||
# But then, we are good, and try guessing
|
||||
$(warning You must specify PRINCIPAL_CLASS, which should be set to the full classname)
|
||||
# But then, we are good, and try guessing. This will only work if the class
|
||||
# is not in a package though, which sounds unlikely.
|
||||
PRINCIPAL_CLASS = $(word 1 $(JAVA_OBJ_FILES))
|
||||
endif
|
||||
|
||||
|
|
|
@ -33,67 +33,15 @@ tool_dir=`dirname $tool`
|
|||
|
||||
#
|
||||
# The java class to execute - harcoded when the template is intalled
|
||||
# by java-tool.make.
|
||||
# by java-tool.make. This should be the full Java classname (eg,
|
||||
# gnu.gnustep.base.xxx)
|
||||
#
|
||||
java_obj_file=JAVA_OBJ_FILE
|
||||
|
||||
#
|
||||
# Check that the java class exists
|
||||
# Load up all the GNUstep environment.
|
||||
#
|
||||
full_java_obj_file=${tool_dir}/Java/${java_obj_file}.class
|
||||
|
||||
if [ ! -f "$full_java_obj_file" ]; then
|
||||
echo "$tool: Installation problem: Can't find java class $java_obj_file !"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Determine the host information if needed
|
||||
#
|
||||
if [ -z "$GNUSTEP_HOST" ]; then
|
||||
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/config.guess)`
|
||||
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/config.sub $GNUSTEP_HOST)`
|
||||
export GNUSTEP_HOST
|
||||
fi
|
||||
if [ -z "$GNUSTEP_HOST_CPU" ]; then
|
||||
GNUSTEP_HOST_CPU=`$GNUSTEP_SYSTEM_ROOT/Library/Makefiles/cpu.sh $GNUSTEP_HOST`
|
||||
GNUSTEP_HOST_CPU=`$GNUSTEP_SYSTEM_ROOT/Library/Makefiles/clean_cpu.sh $GNUSTEP_HOST_CPU`
|
||||
export GNUSTEP_HOST_CPU
|
||||
fi
|
||||
if [ -z "$GNUSTEP_HOST_VENDOR" ]; then
|
||||
GNUSTEP_HOST_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Library/Makefiles/vendor.sh $GNUSTEP_HOST`
|
||||
GNUSTEP_HOST_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Library/Makefiles/clean_vendor.sh $GNUSTEP_HOST_VENDOR`
|
||||
export GNUSTEP_HOST_VENDOR
|
||||
fi
|
||||
if [ -z "$GNUSTEP_HOST_OS" ]; then
|
||||
GNUSTEP_HOST_OS=`$GNUSTEP_SYSTEM_ROOT/Library/Makefiles/os.sh $GNUSTEP_HOST`
|
||||
GNUSTEP_HOST_OS=`$GNUSTEP_SYSTEM_ROOT/Library/Makefiles/clean_os.sh $GNUSTEP_HOST_OS`
|
||||
export GNUSTEP_HOST_OS
|
||||
fi
|
||||
|
||||
#
|
||||
# Load up LD_LIBRARY_PATH
|
||||
#
|
||||
. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/ld_lib_path.sh
|
||||
|
||||
#
|
||||
# Load up CLASSPATH
|
||||
#
|
||||
gnustep_class_path="$GNUSTEP_USER_ROOT/Library/Libraries/Java:$GNUSTEP_LOCAL_ROOT/Library/Libraries/Java:$GNUSTEP_NETWORK_ROOT/Library/Libraries/Java:$GNUSTEP_SYSTEM_ROOT/Library/Libraries/Java"
|
||||
|
||||
if [ -z "$CLASSPATH" ]; then
|
||||
CLASSPATH="$gnustep_class_path"
|
||||
else
|
||||
if ( echo ${CLASSPATH} | grep -v "${gnustep_class_path}" >/dev/null ); then
|
||||
CLASSPATH="$CLASSPATH:$gnustep_class_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ( echo ${CLASSPATH} | grep -v "\./" >/dev/null ); then
|
||||
CLASSPATH="$CLASSPATH:./"
|
||||
fi
|
||||
|
||||
export CLASSPATH
|
||||
. "$GNUSTEP_MAKEFILES/GNUstep.sh"
|
||||
|
||||
#
|
||||
# Find java
|
||||
|
@ -108,8 +56,6 @@ else
|
|||
fi
|
||||
|
||||
#
|
||||
# Run java on the object file
|
||||
# Run java on the object file. The class will be looked up in the classpath.
|
||||
#
|
||||
cd ${tool_dir}/Java
|
||||
exec $java_vm $java_obj_file "$@"
|
||||
|
||||
|
|
Loading…
Reference in a new issue