config.sub fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@5368 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1999-12-03 04:33:31 +00:00
parent 2e9d46d53c
commit 579575b266
10 changed files with 20 additions and 167 deletions

View file

@ -1,3 +1,14 @@
1999-12-02 Adam Fedor <fedor@gnu.org>
* GNUstep.csh.in: Run GNUSTEP_HOST through config.sub to get correct
CPU, etc.
* GNUstep.sh.in: Likewise.
* debugapp.in: Likewise.
* executable.template.in: Likewise.
* names.make: Likewise.
* openapp.in: Likewise.
* opentool.in: Likewise.
Fri Nov 12 11:52:14 1999 Lyndon Tremblay <ltremblay@mezzanine.xnot.com>
* rules.make: Moved some Java rules into gstep-java.

View file

@ -45,6 +45,7 @@ endif
#
if ( ! ${?GNUSTEP_HOST} ) then
setenv GNUSTEP_HOST `(cd /tmp; ${GNUSTEP_SYSTEM_ROOT}/Makefiles/config.guess)`
setenv GNUSTEP_HOST `(cd /tmp; ${GNUSTEP_SYSTEM_ROOT}/Makefiles/config.sub ${GNUSTEP_HOST})`
endif
setenv GNUSTEP_HOST_CPU `${GNUSTEP_SYSTEM_ROOT}/Makefiles/cpu.sh $GNUSTEP_HOST`
setenv GNUSTEP_HOST_VENDOR `${GNUSTEP_SYSTEM_ROOT}/Makefiles/vendor.sh $GNUSTEP_HOST`

View file

@ -48,6 +48,7 @@ export GNUSTEP_MAKEFILES
#
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_MAKEFILES/config.guess)`
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_MAKEFILES/config.sub $GNUSTEP_HOST)`
fi
GNUSTEP_HOST_CPU=`$GNUSTEP_MAKEFILES/cpu.sh $GNUSTEP_HOST`
GNUSTEP_HOST_VENDOR=`$GNUSTEP_MAKEFILES/vendor.sh $GNUSTEP_HOST`

View file

@ -507,6 +507,7 @@ function repswitch {
function hostinfo {
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`$GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess`
GNUSTEP_HOST=`$GNUSTEP_SYSTEM_ROOT/Makefiles/config.sub $GNUSTEP_HOST`
export GNUSTEP_HOST
fi
if [ -z "$GNUSTEP_HOST_CPU" ]; then
@ -639,4 +640,4 @@ function userroot {
export GNUSTEP_USER_ROOT
assignpaths
fi
}
}

View file

@ -132,6 +132,7 @@ fi
#
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`$GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess`
GNUSTEP_HOST=`$GNUSTEP_SYSTEM_ROOT/Makefiles/config.sub $GNUSTEP_HOST`
export GNUSTEP_HOST
fi
if [ -z "$GNUSTEP_HOST_CPU" ]; then

View file

@ -153,6 +153,7 @@ fi
#
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess)`
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.sub $GNUSTEP_HOST)`
export GNUSTEP_HOST
fi
if [ -z "$GNUSTEP_HOST_CPU" ]; then

View file

@ -24,7 +24,7 @@
ifneq ($(internal_names_clean), yes)
ifeq ($(GNUSTEP_HOST),)
GNUSTEP_HOST := $(shell (cd /tmp; $(CONFIG_GUESS_SCRIPT)))
GNUSTEP_HOST := $(shell (cd /tmp; $(CONFIG_SUB_SCRIPT) $(CONFIG_GUESS_SCRIPT)))
GNUSTEP_HOST_CPU := $(shell (cd /tmp; $(CONFIG_CPU_SCRIPT) $(GNUSTEP_HOST)))
GNUSTEP_HOST_VENDOR := $(shell (cd /tmp; $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_HOST)))
GNUSTEP_HOST_OS := $(shell (cd /tmp; $(CONFIG_OS_SCRIPT) $(GNUSTEP_HOST)))

View file

@ -123,6 +123,7 @@ fi
#
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess)`
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.sub $GNUSTEP_HOST)`
export GNUSTEP_HOST
fi
if [ -z "$GNUSTEP_HOST_CPU" ]; then

165
opentool
View file

@ -1,165 +0,0 @@
#! /bin/sh
#
# Copyright (C) 1997, 1999 Free Software Foundation, Inc.
#
# Author: Scott Predescu <ovidiu@net-community.com>
# Author: Ovidiu Predescu <ovidiu@net-community.com>
# Date: February 1999
#
# This file is part of the GNUstep Makefile Package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Try to execute the GNUstep tool passed as argument. The tool is
# searched through the GNUstep directories if a complete or relative path name
# is not specified. The arguments passed after the tool name are passed
# unmodified to the tool.
if [ -z "$1" ]; then
echo usage: `basename $0` [--library-combo=...] tool [arguments...]
echo `basename $0` --help for help
exit 1
fi
if [ -z "$EXEEXT" ]; then
EXEEXT=
fi
# traps the parameters
case $1 in
--help)
echo usage: `basename $0` [--library-combo=...] tool [arguments...]
echo
echo [--library-combo=...] specifies a GNUstep backend to use.
echo It overrides the default LIBRARY_COMBO environment variable.
echo --library-combo=gnu-xdps for GNUstep XDPS Backend
echo --library-combo=gnu-xraw for GNUstep XRaw Backend
echo --library-combo=fd-xraw for GNUstep XRaw Backend with libFoundation
echo --library-combo=fd-xdps for GNUstep XDPS Backend with libFoundation
echo --library-combo=nx for NeXT OPENSTEP
echo
echo tool is the complete or relative name of the tool executable
echo without any extension, like dread.
echo
echo [arguments...] are the arguments to the tool.
exit 0
;;
--library-combo=*)
LIBRARY_COMBO=`echo $1 | sed 's/--library-combo=//'`
if [ -z "$2" ]; then
echo usage: `basename $0` [--library-combo=...] tool [arguments...]
echo `basename $0` --help for help
exit 1
fi
tool=$2; shift; shift
;;
*)
tool=$1; shift;;
esac
# TODO: these defaults need to be output to the user
if [ "$LIBRARY_COMBO" = nx ]; then
LIBRARY_COMBO=nx-nx-nx-nil
elif [ "$LIBRARY_COMBO" = gnu-xdps ]; then
LIBRARY_COMBO=gnu-gnu-gnu-xdps
elif [ "$LIBRARY_COMBO" = gnu-xraw ]; then
LIBRARY_COMBO=gnu-gnu-gnu-xraw
elif [ "$LIBRARY_COMBO" = fd-xraw ]; then
LIBRARY_COMBO=gnu-fd-gnu-xraw
elif [ "$LIBRARY_COMBO" = fd-xdps ]; then
LIBRARY_COMBO=gnu-fd-gnu-xdps
fi
export LIBRARY_COMBO
# Remove leading slashes at the end of the tool name
tool=`echo $tool | sed 's%/*$%%'`
if [ -z "$EXEEXT" ]; then
tool=$tool$EXEEXT
fi
#
# Determine the host information
#
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess)`
export GNUSTEP_HOST
fi
if [ -z "$GNUSTEP_HOST_CPU" ]; then
GNUSTEP_HOST_CPU=`$GNUSTEP_SYSTEM_ROOT/Makefiles/cpu.sh $GNUSTEP_HOST`
GNUSTEP_HOST_CPU=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_cpu.sh $GNUSTEP_HOST_CPU`
export GNUSTEP_HOST_CPU
fi
if [ -z "$GNUSTEP_HOST_VENDOR" ]; then
GNUSTEP_HOST_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Makefiles/vendor.sh $GNUSTEP_HOST`
GNUSTEP_HOST_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_vendor.sh $GNUSTEP_HOST_VENDOR`
export GNUSTEP_HOST_VENDOR
fi
if [ -z "$GNUSTEP_HOST_OS" ]; then
GNUSTEP_HOST_OS=`$GNUSTEP_SYSTEM_ROOT/Makefiles/os.sh $GNUSTEP_HOST`
GNUSTEP_HOST_OS=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_os.sh $GNUSTEP_HOST_OS`
export GNUSTEP_HOST_OS
fi
if [ "$LIBRARY_COMBO" = nx-nx-nx-nil -a $GNUSTEP_HOST_OS = nextstep4 ]; then
if [ -f "$full_toolname/library_paths.openapp" ]; then
additional_library_paths="`cat $full_toolname/library_paths.openapp`"
fi
else
if [ -f "$full_toolname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO/library_paths.openapp" ]; then
additional_library_paths="`cat $full_toolname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO/library_paths.openapp`"
fi
fi
case $tool in
/*) # An absolute path.
full_toolname=$tool;;
*/*) # A relative path
full_toolname=`(cd $tool; pwd)`;;
*) # A path that should be searched into GNUstep tool paths
GNUSTEP_HOST_DIR=$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
# search for a local one
for file in */$GNUSTEP_HOST_DIR/$LIBRARY_COMBO/$tool; do
if [ -x $file ]; then
full_toolname=$file;
break;
fi
done
# search in the user/local/system
SPATH=$SPATH:$GNUSTEP_USER_ROOT/Tools/$GNUSTEP_HOST_DIR
SPATH=$SPATH:$GNUSTEP_USER_ROOT/Tools/$GNUSTEP_HOST_DIR/$LIBRARY_COMBO
SPATH=$SPATH:$GNUSTEP_LOCAL_ROOT/Tools/$GNUSTEP_HOST_DIR
SPATH=$SPATH:$GNUSTEP_LOCAL_ROOT/Tools/$GNUSTEP_HOST_DIR/$LIBRARY_COMBO
SPATH=$SPATH:$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_DIR
SPATH=$SPATH:$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_DIR/$LIBRARY_COMBO
SPATH=$SPATH:$PATH
IFS=:
for dir in $SPATH; do
if [ -x $dir/$tool ]; then
full_toolname=$dir/$tool;
break;
fi
done;;
esac
if [ -z "$full_toolname" ]; then
echo "Can't find the required tool: $tool!"
exit 1
fi
# Load up LD_LIBRARY_PATH
# this needs to be PATH on NT
. $GNUSTEP_SYSTEM_ROOT/Makefiles/ld_lib_path.sh
IFS=" "
$full_toolname $@

View file

@ -91,6 +91,7 @@ fi
#
if [ -z "$GNUSTEP_HOST" ]; then
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess)`
GNUSTEP_HOST=`(cd /tmp; $GNUSTEP_SYSTEM_ROOT/Makefiles/config.sub $GNUSTEP_HOST)`
export GNUSTEP_HOST
fi
if [ -z "$GNUSTEP_HOST_CPU" ]; then