diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 00000000..b86bd3a6 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,9 @@ +config.log +config.make +config.cache +which_lib +Makefile +GNUstep.sh +config.h +config.status +openapp diff --git a/ChangeLog b/ChangeLog index 4a42ba42..25809677 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Mon Oct 13 16:06:12 1997 Ovidiu Predescu + + * openapp.in: New file. + * GNUstep.sh.in: Added $GNUSTEP_SYSTEM_ROOT/Tools to the PATH. + * Makefile.in: Install openapp in $GNUSTEP_SYSTEM_ROOT/Tools. + * configure.in: Create openapp. + * ld_lib_path.sh: Changed to export the library path for different + systems. + Mon Oct 13 12:21:59 1997 Ovidiu Predescu * configure.in: Check to see if a DPS directory exists inside the X11 diff --git a/GNUstep.sh.in b/GNUstep.sh.in index c579b77d..eebd7f97 100755 --- a/GNUstep.sh.in +++ b/GNUstep.sh.in @@ -46,6 +46,7 @@ export GNUSTEP_HOST GNUSTEP_HOST_CPU GNUSTEP_HOST_VENDOR GNUSTEP_HOST_OS # # Add the GNUstep tools directories to the path # +PATH=$GNUSTEP_SYSTEM_ROOT/Tools:$PATH PATH=$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS:$PATH PATH=$GNUSTEP_LOCAL_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS:$PATH PATH=$GNUSTEP_USER_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS:$PATH diff --git a/Makefile.in b/Makefile.in index f7abdbb6..baca0dcf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -44,6 +44,7 @@ GNUSTEP_TARGET_VENDOR := $(shell ./clean_vendor.sh $(GNUSTEP_TARGET_VENDOR)) GNUSTEP_TARGET_OS := $(shell ./clean_os.sh $(GNUSTEP_TARGET_OS)) makedir = $(prefix)/Makefiles +tooldir = $(prefix)/Tools GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS) INSTALL = @INSTALL@ @@ -59,11 +60,13 @@ install: all $(srcdir)/mkinstalldirs $(prefix) $(makedir) \ $(makedir)/$(GNUSTEP_TARGET_CPU) \ $(makedir)/$(GNUSTEP_TARGET_DIR) \ + $(tooldir) \ $(prefix)/share $(INSTALL_PROGRAM) -m 755 which_lib $(makedir)/$(GNUSTEP_TARGET_DIR) for f in config.guess config.sub install-sh mkinstalldirs *.sh; do \ $(INSTALL_PROGRAM) -m 755 $$f $(makedir); \ done + $(INSTALL_PROGRAM) -m 755 openapp $(tooldir); \ for f in aggregate.make application.make bundle.make clean.make \ common.make core.make library.make rules.make target.make \ tool.make test.make MediaBook.func; do \ diff --git a/configure b/configure index 7a0be621..30da8174 100755 --- a/configure +++ b/configure @@ -1576,7 +1576,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "config.h config.make Makefile GNUstep.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "config.h config.make openapp Makefile GNUstep.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index f2d0d5a7..ba0176dd 100644 --- a/configure.in +++ b/configure.in @@ -108,4 +108,4 @@ AC_SUBST(ac_cv_library_combo) #-------------------------------------------------------------------- # Produce the output files #-------------------------------------------------------------------- -AC_OUTPUT(config.h config.make Makefile GNUstep.sh) +AC_OUTPUT(config.h config.make openapp Makefile GNUstep.sh) diff --git a/ld_lib_path.sh b/ld_lib_path.sh index 5acc8aa5..d08f343e 100755 --- a/ld_lib_path.sh +++ b/ld_lib_path.sh @@ -8,7 +8,7 @@ # Copyright (C) 1997 Free Software Foundation, Inc. # # Author: Scott Christley -# +# Author: Ovidiu Predescu # This file is part of the GNUstep Makefile Package. # # This library is free software; you can redistribute it and/or @@ -23,17 +23,37 @@ # # The first (and only) parameter to this script is the canonical -# operating system name +# operating system name. If the environment variable export_variable +# is not set to `yes' it prints the name of the variable whose +# value keeps the paths searched for libraries -# LD_LIBRARY_PATH is the default name -ld_lib_path="LD_LIBRARY_PATH" +last_path_part=Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$library_combo -case "$1" in +host_os=$GNUSTEP_HOST_OS - *nextstep4*) - ld_lib_path="DYLD_LIBRARY_PATH" - ;; +if [ -z "$host_os" ]; then + host_os=$1 +fi -esac +case "$host_os" in -echo $ld_lib_path + *nextstep4*) + ld_lib_path="DYLD_LIBRARY_PATH" + DYLD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part:$GNUSTEP_LOCAL_ROOT/$last_path_part:$GNUSTEP_SYSTEM_ROOT/$last_path_part:$DYLD_LIBRARY_PATH" + export DYLD_LIBRARY_PATH;; + + *solaris*) + ld_lib_path="LD_LIBRARY_PATH" + LD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part;$GNUSTEP_LOCAL_ROOT/$last_path_part;$GNUSTEP_SYSTEM_ROOT/$last_path_part;$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH;; + + *) + ld_lib_path="LD_LIBRARY_PATH" + LD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part:$GNUSTEP_LOCAL_ROOT/$last_path_part:$GNUSTEP_SYSTEM_ROOT/$last_path_part:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH;; + +esac + +if [ "$export_variable" != yes ]; then + echo $ld_lib_path +fi diff --git a/openapp.in b/openapp.in new file mode 100755 index 00000000..feaf3b06 --- /dev/null +++ b/openapp.in @@ -0,0 +1,82 @@ +#!/bin/sh +# +# Copyright (C) 1997 Free Software Foundation, Inc. +# +# Author: Ovidiu Predescu +# Date: October 1997 +# +# 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 application passed as argument. The application is +# searched through the GNUstep directories if a complete or relative path name +# is not specified. + +if [ -z "$1" ]; then + echo usage: `basename $0` [--library-combo=...] application + exit 1 +fi + +library_combo=@ac_cv_library_combo@ + +while [ -n "$*" ]; do + case $1 in + --library-combo=*) library_combo=`echo $1 | sed 's/--library-combo=//'`;; + *) app=$1;; + esac + shift +done + +case $app in + /*) # An absolute path. + full_appname=$app;; + */*) # A relative path + full_appname=`(cd $app; pwd)`;; + *) # A path that should be searched into the GNUstep paths + SPATH=.:$GNUSTEP_USER_ROOT/Apps:$GNUSTEP_LOCAL_ROOT/Apps:$GNUSTEP_SYSTEM_ROOT/Apps:$PATH + IFS=: + for dir in $SPATH; do + if [ -d $dir/$app ]; then + full_appname=`(cd $dir/$app; pwd)` + break; + fi + done;; +esac + +appname=`echo $app | sed 's/\.[a-z]*$//'` +export_variable=yes . $GNUSTEP_SYSTEM_ROOT/Makefiles/ld_lib_path.sh + +if [ "$library_combo" = nx_nx_nx_nil -a $GNUSTEP_HOST_OS = nextstep4 ]; then + if [ ! -d $full_appname/$appname ]; then + echo "$full_appname application does not have a binary for this kind of machine and operating system." + exit 1 + fi + + exec $full_appname/$appname + +else + # Determine if the application has a binary for this operating system + if [ ! -d $full_appname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS ]; then + echo "$full_appname application does not have a binary for this kind of machine and operating system." + exit 1 + fi + + if [ ! -d $full_appname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$library_combo ]; then + echo "$full_appname application does not have a binary for this combination of libraries ($library_combo)." + exit 1 + fi + + exec $full_appname/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$library_combo/$appname + +fi + +echo "Cannot exec the specified application!"