* opentool.in: New file.

* rootinstall.sh: New file.
	* rootuninstall.sh: New file.
	* openapp.in: Add help text.
	* debugapp.in: Add help text.
	* configure.in: Add opentool.in.
	* configure: Regenerate.
	* GNUmakefile.in: Install/uninstall new files.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@3750 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Scott Christley 1999-02-18 06:22:33 +00:00
parent 8537a14edb
commit c688a63b2e
10 changed files with 331 additions and 5 deletions

View file

@ -1,3 +1,14 @@
1999-02-17 Scott Christley <scottc@net-community.com>
* opentool.in: New file.
* rootinstall.sh: New file.
* rootuninstall.sh: New file.
* openapp.in: Add help text.
* debugapp.in: Add help text.
* configure.in: Add opentool.in.
* configure: Regenerate.
* GNUmakefile.in: Install/uninstall new files.
Tun Feb 16 16:26:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* services.make: Tidied with removal of some unneccessary dependencies.

View file

@ -80,11 +80,13 @@ install: all
GNUstep.sh MediaBook.sh clean_cpu.sh clean_os.sh \
clean_vendor.sh cpu.sh ld_lib_path.sh os.sh \
transform_paths.sh vendor.sh \
rootinstall.sh rootuninstall.sh \
GNUstep.csh ld_lib_path.csh ; do \
$(INSTALL_PROGRAM) -m 755 $$f $(makedir); \
done
$(INSTALL_PROGRAM) -m 755 openapp $(tooldir); \
$(INSTALL_PROGRAM) -m 755 debugapp $(tooldir); \
$(INSTALL_PROGRAM) -m 755 opentool $(tooldir); \
for f in aggregate.make application.make bundle.make service.make \
common.make brain.make library.make rules.make target.make \
tool.make test-library.make names.make objc.make \
@ -101,11 +103,13 @@ uninstall:
GNUstep.sh MediaBook.sh clean_cpu.sh clean_os.sh \
clean_vendor.sh cpu.sh ld_lib_path.sh os.sh \
transform_paths.sh vendor.sh \
rootinstall.sh rootuninstall.sh \
GNUstep.csh ld_lib_path.csh ; do \
rm -f $(makedir)/$$f; \
done
rm -f $(tooldir)/openapp; \
rm -f $(tooldir)/debugapp; \
rm -f $(tooldir)/opentool; \
for f in aggregate.make application.make bundle.make \
common.make brain.make library.make rules.make target.make \
tool.make test-library.make names.make objc.make \
@ -145,3 +149,6 @@ debugapp: debugapp.in
openapp: openapp.in
$(SHELL) config.status
opentool: opentool.in
$(SHELL) config.status

View file

@ -39,6 +39,7 @@ export MB_ORIG_PATH MB_PROD_LD_LIBRARY_PATH
#
# GCC environment variables
# we will use this for hosting Project Center
#
#GCC_EXEC_PREFIX=$GNUSTEP_SYSTEM_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/gcc-lib/
#export GCC_EXEC_PREFIX

6
configure vendored
View file

@ -1789,7 +1789,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "config.h config.make openapp debugapp GNUmakefile
trap 'rm -fr `echo "config.h config.make openapp debugapp opentool GNUmakefile
GNUstep.sh GNUstep.csh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -1890,7 +1890,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"config.h config.make openapp debugapp GNUmakefile
CONFIG_FILES=\${CONFIG_FILES-"config.h config.make openapp debugapp opentool GNUmakefile
GNUstep.sh GNUstep.csh"}
EOF
cat >> $CONFIG_STATUS <<\EOF
@ -2062,7 +2062,7 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
chmod a+x openapp debugapp
chmod a+x openapp debugapp opentool
exit 0
EOF
chmod +x $CONFIG_STATUS

View file

@ -189,6 +189,6 @@ AC_SUBST(ac_cv_objc_threaded)
#--------------------------------------------------------------------
# Produce the output files
#--------------------------------------------------------------------
AC_OUTPUT(config.h config.make openapp debugapp GNUmakefile
AC_OUTPUT(config.h config.make openapp debugapp opentool GNUmakefile
GNUstep.sh GNUstep.csh,
chmod a+x openapp debugapp)
chmod a+x openapp debugapp opentool)

View file

@ -24,6 +24,7 @@
if [ -z "$1" ]; then
echo usage: `basename $0` [--library-combo=...] application [arguments...]
echo `basename $0` --help for help
exit 1
fi
@ -35,10 +36,28 @@ if [ -z "$LIBRARY_COMBO" ]; then
fi
case $1 in
--help)
echo usage: `basename $0` [--library-combo=...] application [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 application is the complete or relative name of the application
echo program with the .app extension, like Edit.app.
echo
echo [arguments...] are the arguments to the application.
exit 0
;;
--library-combo=*)
LIBRARY_COMBO=`echo $1 | sed 's/--library-combo=//'`
if [ -z "$2" ]; then
echo usage: `basename $0` [--library-combo=...] application [arguments...]
echo `basename $0` --help for help
exit 1
fi
app=$2; shift; shift

View file

@ -24,6 +24,7 @@
if [ -z "$1" ]; then
echo usage: `basename $0` [--library-combo=...] application [arguments...]
echo `basename $0` --help for help
exit 1
fi
@ -34,11 +35,30 @@ if [ -z "$LIBRARY_COMBO" ]; then
LIBRARY_COMBO=@ac_cv_library_combo@
fi
# trap the --library-combo parameter
case $1 in
--help)
echo usage: `basename $0` [--library-combo=...] application [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 application is the complete or relative name of the application
echo program with the .app extension, like Edit.app.
echo
echo [arguments...] are the arguments to the application.
exit 0
;;
--library-combo=*)
LIBRARY_COMBO=`echo $1 | sed 's/--library-combo=//'`
if [ -z "$2" ]; then
echo usage: `basename $0` [--library-combo=...] application [arguments...]
echo `basename $0` --help for help
exit 1
fi
app=$2; shift; shift
@ -47,6 +67,7 @@ case $1 in
app=$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
@ -121,8 +142,12 @@ else
fi
fi
# get base app name
appname=`echo $app | sed 's/\.[a-z]*$//'`
appname=`basename $appname`
# Load up LD_LIBRARY_PATH
# this needs to be PATH on NT
. $GNUSTEP_SYSTEM_ROOT/Makefiles/ld_lib_path.sh
if [ "$LIBRARY_COMBO" = nx-nx-nx-nil -a $GNUSTEP_HOST_OS = nextstep4 ]; then

157
opentool.in Normal file
View file

@ -0,0 +1,157 @@
#! /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=@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=`$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
SPATH=./$GNUSTEP_HOST_DIR
SPATH=./$GNUSTEP_HOST_DIR/$LIBRARY_COMBO
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 $@

58
rootinstall.sh Normal file
View file

@ -0,0 +1,58 @@
#! /bin/sh
#
# rootinstall.sh
# Perform all of the root installation tasks
#
# Copyright (C) 1999 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@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.
#
# Perform all of the root installation tasks
# whoami is not completely portable
if [ "`whoami`" != "root" ]; then
echo ERROR: You must be root to run this script
exit 1;
fi;
GNUSTEP_TARGET_DIR=$GNUSTEP_TARGET_CPU/$GNUSTEP_TARGET_OS
# taken from base/Tools/Makefile.postamble
# Install the gdomap executables
# TODO: automatically handle GDOMAP_PORT_OVERRIDE
echo Installing gdomap
echo "WARNING: gdomap MUST be installed owned by rooot and with";
echo "the 's-bit' set unless you defined 'GDOMAP_PORT_OVERRIDE' in";
echo "gdomap.h before compiling gdomap.c and NSPortNameServer.m";
echo "in which case you should install it by hand.";
chmod 05755 $GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_TARGET_DIR/gdomap
chown root $GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_TARGET_DIR/gdomap
#
if [ "$INSTALL_ROOT_DIR" = "" ]; then
services=/etc/services;
echo "GNUstep addons written to /etc/services";
else
mkdir -p $INSTALL_ROOT_DIR/etc;
services=$INSTALL_ROOT_DIR/etc/services.add;
echo "GNUstep addons for /etc/services written to $services";
fi;
if [ "`fgrep gdomap $services 2>/dev/null`" = "" ]; then
set -x;
echo "gdomap 538/tcp # GNUstep distrib objects" >> $services;
echo "gdomap 538/udp # GNUstep distrib objects" >> $services;
fi

48
rootuninstall.sh Normal file
View file

@ -0,0 +1,48 @@
#! /bin/sh
#
# rootuninstall.sh
# Undo the root installation tasks
#
# Copyright (C) 1999 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@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.
#
# Perform all of the root de-installation tasks
# whoami is not completely portable
if [ "`whoami`" != "root" ]; then
echo ERROR: You must be root to run this script
exit 1;
fi;
GNUSTEP_TARGET_DIR=$GNUSTEP_TARGET_CPU/$GNUSTEP_TARGET_OS
# Uninstall the gdomap executable
# TODO: automatically handle GDOMAP_PORT_OVERRIDE
echo Uninstalling gdomap
rm -f $GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_TARGET_DIR/gdomap
if [ "$INSTALL_ROOT_DIR" = "" ]; then
services=/etc/services;
else
services=$INSTALL_ROOT_DIR/etc/services.add;
fi;
if [ "`fgrep gdomap $services 2>/dev/null`" != "" ]; then
echo "ATTENTION: Manually remove these lines from your $services file"
echo "gdomap 538/tcp # GNUstep distrib objects"
echo "gdomap 538/udp # GNUstep distrib objects"
fi