mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Updated openapp and opentool for new filesystem config; make sure GNUSTEP_MAKEFILES is treated as a separate config
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24534 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
60d2f74200
commit
e033c6cf9c
7 changed files with 121 additions and 39 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* GNUstep.conf.in (GNUSTEP_MAKEFILES): New variable.
|
||||
* GNUstep.csh.in: By default, set GNUSTEP_MAKEFILES to the
|
||||
configure default if not set.
|
||||
* GNUstep.sh.in: Same change.
|
||||
* gnustep-config.in: Same change.
|
||||
|
||||
* openapp.in: Updated to use new filesystem config.
|
||||
* opentool.in: Updated to use new filesystem config; also,
|
||||
remove unused check for empty GNUSTEP_MAKEFILES after
|
||||
GNUstep.sh has been sourced.
|
||||
|
||||
2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* GNUmakefile.in (distclean): Remove GNUstep.conf.
|
||||
|
|
|
@ -44,6 +44,12 @@ GNUSTEP_USER_DIR=@GNUSTEP_USER_DIR@
|
|||
## relative to the user home directory.
|
||||
GNUSTEP_USER_DEFAULTS_DIR=@GNUSTEP_USER_DEFAULTS_DIR@
|
||||
|
||||
|
||||
## This is where the gnustep-make Makefiles are installed.
|
||||
## Traditionally, this is /usr/GNUstep/System/Library/Makefiles
|
||||
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
|
||||
|
||||
|
||||
## This is where System GUI Applications get installed.
|
||||
## Traditionally it is /usr/GNUstep/System/Apps.
|
||||
GNUSTEP_SYSTEM_APPS=@GNUSTEP_SYSTEM_APPS@
|
||||
|
|
|
@ -116,7 +116,7 @@ if ( ! ${?LIBRARY_COMBO} ) then
|
|||
endif
|
||||
|
||||
if ( ! ${?GNUSTEP_MAKEFILES} ) then
|
||||
setenv GNUSTEP_MAKEFILES "${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles"
|
||||
setenv GNUSTEP_MAKEFILES "@GNUSTEP_MAKEFILES@"
|
||||
endif
|
||||
|
||||
if ( ! ${?GNUSTEP_USER_DIR} ) then
|
||||
|
|
|
@ -111,14 +111,18 @@ fi
|
|||
|
||||
# Now, set any essential variable (that is not already set) to the
|
||||
# built-in values.
|
||||
|
||||
# This is deprecated and will be removed
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SYSTEM_ROOT@
|
||||
fi
|
||||
|
||||
# This is deprecated and will be removed
|
||||
if [ -z "$GNUSTEP_LOCAL_ROOT" ]; then
|
||||
GNUSTEP_LOCAL_ROOT=@GNUSTEP_LOCAL_ROOT@
|
||||
fi
|
||||
|
||||
# This is deprecated and will be removed
|
||||
if [ -z "$GNUSTEP_NETWORK_ROOT" ]; then
|
||||
GNUSTEP_NETWORK_ROOT=@GNUSTEP_NETWORK_ROOT@
|
||||
fi
|
||||
|
@ -135,7 +139,7 @@ fi
|
|||
export GNUSTEP_IS_FLATTENED GNUSTEP_FLATTENED LIBRARY_COMBO
|
||||
|
||||
if [ -z "$GNUSTEP_MAKEFILES" ]; then
|
||||
GNUSTEP_MAKEFILES=$GNUSTEP_SYSTEM_ROOT/Library/Makefiles
|
||||
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
|
||||
fi
|
||||
export GNUSTEP_MAKEFILES
|
||||
|
||||
|
@ -153,6 +157,7 @@ case "$GNUSTEP_USER_DIR" in
|
|||
GNUSTEP_USER_ROOT="$GNUSTEP_HOME/$GNUSTEP_USER_DIR";;
|
||||
esac
|
||||
|
||||
# This is deprecated and will be removed
|
||||
export GNUSTEP_USER_ROOT
|
||||
|
||||
# If multi-platform support is disabled, just use the hardcoded cpu,
|
||||
|
|
|
@ -94,12 +94,8 @@ if [ -n "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
|
||||
GNUSTEP_SYSTEM_ROOT=@GNUSTEP_SYSTEM_ROOT@
|
||||
fi
|
||||
|
||||
if [ -z "$GNUSTEP_MAKEFILES" ]; then
|
||||
GNUSTEP_MAKEFILES=$GNUSTEP_SYSTEM_ROOT/Library/Makefiles
|
||||
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
57
openapp.in
57
openapp.in
|
@ -92,8 +92,8 @@ while [ x"$1" != x ]; do
|
|||
shift;;
|
||||
--library-combo=*)
|
||||
# FIXME - Reset the existing library combo environment ? We haven't read
|
||||
# the config file yet, so GNUSTEP_SYSTEM_ROOT might not be set yet! :-/
|
||||
# . $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep-reset.sh
|
||||
# the config file yet, so GNUSTEP_MAKEFILES might not be set yet! :-/
|
||||
# . $GNUSTEP_MAKEFILES/GNUstep-reset.sh
|
||||
LIBRARY_COMBO=`echo "$1" | sed 's/--library-combo=//'`
|
||||
if [ -z "$2" ]; then
|
||||
echo "Missing application name. Please try openapp --help for more help."
|
||||
|
@ -109,15 +109,48 @@ while [ x"$1" != x ]; do
|
|||
esac
|
||||
done
|
||||
|
||||
# Try to determine GNUSTEP_MAKEFILES to source GNUstep.sh
|
||||
if [ -z "$GNUSTEP_CONFIG_FILE" ]; then
|
||||
GNUSTEP_CONFIG_FILE=@GNUSTEP_CONFIG_FILE@
|
||||
fi
|
||||
. $GNUSTEP_CONFIG_FILE
|
||||
|
||||
# Ahm ... TODO: we shouldn't need to do this if we are running flattened. :-)
|
||||
# Anyway it won't harm (just slow things down a lot). This must be
|
||||
# after parsing the --library-combo parameter.
|
||||
. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
|
||||
if [ -z "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
GNUSTEP_USER_CONFIG_FILE=@GNUSTEP_USER_CONFIG_FILE@
|
||||
fi
|
||||
|
||||
if [ -f "$GNUSTEP_CONFIG_FILE" ]; then
|
||||
. "$GNUSTEP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
GNUSTEP_HOME=~
|
||||
|
||||
if [ -n "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
case "$GNUSTEP_USER_CONFIG_FILE" in
|
||||
/*) # An absolute path
|
||||
if [ -f "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
. "$GNUSTEP_USER_CONFIG_FILE"
|
||||
fi;;
|
||||
*) # Something else
|
||||
if [ -f "$GNUSTEP_HOME/$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
. "$GNUSTEP_HOME/$GNUSTEP_USER_CONFIG_FILE"
|
||||
fi;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$GNUSTEP_MAKEFILES" ]; then
|
||||
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
|
||||
fi
|
||||
# OK, we now have GNUSTEP_MAKEFILES, source GNUstep.sh
|
||||
|
||||
# Ahm ... TODO: we shouldn't need to source GNUstep.sh if we are
|
||||
# running flattened. :-) Anyway it won't harm (just slow things down a
|
||||
# lot). This must be after parsing the --library-combo parameter.
|
||||
|
||||
# Also, we'd like to get the GNUSTEP_*_APPS directories so we can
|
||||
# search them, so tell GNUstep.sh to export all variabes.
|
||||
GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
unset GNUSTEP_SH_EXPORT_ALL_VARIABLES
|
||||
|
||||
if [ -z "$GNUSTEP_IS_FLATTENED" ]; then
|
||||
GNUSTEP_IS_FLATTENED=@GNUSTEP_IS_FLATTENED@
|
||||
|
@ -157,13 +190,13 @@ case "$openapp_app" in
|
|||
;;
|
||||
*)
|
||||
# We should first search the standard GNUstep locations.
|
||||
for openapp_dir in "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT"; do
|
||||
# Standard locations ... in $dir/Applications/$openapp_app
|
||||
for openapp_dir in "$GNUSTEP_USER_APPS" "$GNUSTEP_LOCAL_APPS" "$GNUSTEP_NETWORK_APPS" "$GNUSTEP_SYSTEM_APPS"; do
|
||||
# Standard locations ... in $domain_apps/$openapp_app
|
||||
if [ -n "$openapp_only_find" ]; then
|
||||
echo "Trying $openapp_dir/Applications/$openapp_app..."
|
||||
echo "Trying $openapp_dir/$openapp_app..."
|
||||
fi
|
||||
if [ -d "$openapp_dir/Applications/$openapp_app" ]; then
|
||||
openapp_full_appname="`(cd \"$openapp_dir/Applications/$openapp_app\"; pwd)`"
|
||||
if [ -d "$openapp_dir/$openapp_app" ]; then
|
||||
openapp_full_appname="`(cd \"$openapp_dir/$openapp_app\"; pwd)`"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
69
opentool.in
69
opentool.in
|
@ -2,11 +2,12 @@
|
|||
#
|
||||
# @configure_input@
|
||||
#
|
||||
# Copyright (C) 1997, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997 - 2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Scott Predescu <ovidiu@net-community.com>
|
||||
# Author: Ovidiu Predescu <ovidiu@net-community.com>
|
||||
# Date: February 1999
|
||||
# Author: Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
# Date: 1997 - 2007
|
||||
#
|
||||
# This file is part of the GNUstep Makefile Package.
|
||||
#
|
||||
|
@ -34,12 +35,45 @@ if [ -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Try to determine GNUSTEP_MAKEFILES to source GNUstep.sh
|
||||
if [ -z "$GNUSTEP_CONFIG_FILE" ]; then
|
||||
GNUSTEP_CONFIG_FILE=@GNUSTEP_CONFIG_FILE@
|
||||
fi
|
||||
. $GNUSTEP_CONFIG_FILE
|
||||
|
||||
. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
|
||||
if [ -z "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
GNUSTEP_USER_CONFIG_FILE=@GNUSTEP_USER_CONFIG_FILE@
|
||||
fi
|
||||
|
||||
if [ -f "$GNUSTEP_CONFIG_FILE" ]; then
|
||||
. "$GNUSTEP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
GNUSTEP_HOME=~
|
||||
|
||||
if [ -n "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
case "$GNUSTEP_USER_CONFIG_FILE" in
|
||||
/*) # An absolute path
|
||||
if [ -f "$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
. "$GNUSTEP_USER_CONFIG_FILE"
|
||||
fi;;
|
||||
*) # Something else
|
||||
if [ -f "$GNUSTEP_HOME/$GNUSTEP_USER_CONFIG_FILE" ]; then
|
||||
. "$GNUSTEP_HOME/$GNUSTEP_USER_CONFIG_FILE"
|
||||
fi;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$GNUSTEP_MAKEFILES" ]; then
|
||||
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
|
||||
fi
|
||||
# OK, we now have GNUSTEP_MAKEFILES, source GNUstep.sh.
|
||||
|
||||
# Also, we'd like to get the GNUSTEP_*_TOOLS directories so we can
|
||||
# search them, so tell GNUstep.sh to export all variabes.
|
||||
GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
unset GNUSTEP_SH_EXPORT_ALL_VARIABLES
|
||||
|
||||
|
||||
if [ -z "$EXEEXT" ]; then
|
||||
EXEEXT=@EXEEXT@
|
||||
|
@ -51,9 +85,6 @@ do
|
|||
case "$1" in
|
||||
--library-combo=*)
|
||||
tmp_makefiles="$GNUSTEP_MAKEFILES"
|
||||
if [ -z "$tmp_makefiles" ]; then
|
||||
tmp_makefiles="$GNUSTEP_SYSTEM_ROOT/Library/Makefiles"
|
||||
fi
|
||||
. "$tmp_makefiles/GNUstep-reset.sh"
|
||||
LIBRARY_COMBO=`echo "$1" | sed 's/--library-combo=//'`
|
||||
. "$tmp_makefiles/GNUstep.sh"
|
||||
|
@ -117,21 +148,20 @@ case "$tool" in
|
|||
|
||||
# Local tool not found - Search for an installed one
|
||||
# we search in the order in:
|
||||
# GNUSTEP_USER_ROOT
|
||||
# GNUSTEP_LOCAL_ROOT
|
||||
# GNUSTEP_NETWORK_ROOT
|
||||
# GNUSTEP_SYSTEM_ROOT
|
||||
# GNUSTEP_USER_TOOLS
|
||||
# GNUSTEP_LOCAL_TOOLS
|
||||
# GNUSTEP_NETWORK_TOOLS
|
||||
# GNUSTEP_SYSTEM_TOOLS
|
||||
#
|
||||
# We look in the GNUSTEP_HOST_CPU/GNUSTEP_HOST_OS/LIBRARY_COMBO
|
||||
# subdirectory first, then the GNUSTEP_HOST_CPU/GNUSTEP_HOST_OS
|
||||
# subdirectory, then the top-level directory.
|
||||
# (For flattened systems we skip the first two options.
|
||||
#
|
||||
for dir in "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT" ; do
|
||||
tmpdir="$dir/Tools"
|
||||
for dir in "$GNUSTEP_USER_TOOLS" "$GNUSTEP_LOCAL_TOOLS" "$GNUSTEP_NETWORK_TOOLS" "$GNUSTEP_SYSTEM_TOOLS" ; do
|
||||
if [ "$GNUSTEP_IS_FLATTENED" = "no" ]; then
|
||||
tmpgnudir="$dir/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS"
|
||||
tmplibdir="$tmpgnudir/$LIBRARY_COMBO"
|
||||
tmpgnudir="$dir/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS"
|
||||
tmplibdir="$dir/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO"
|
||||
# echo "$tmplibdir/$tool";
|
||||
if [ -x "$tmplibdir/$tool" ]; then
|
||||
# echo "Found: $tmplibdir/$tool";
|
||||
|
@ -144,14 +174,13 @@ case "$tool" in
|
|||
break;
|
||||
fi
|
||||
fi
|
||||
# echo "$tmpdir/$tool";
|
||||
if [ -x "$tmpdir/$tool" ]; then
|
||||
# echo "Found: $tmpdir/$tool";
|
||||
full_toolname="$tmpdir/$tool"
|
||||
# echo "$dir/$tool";
|
||||
if [ -x "$dir/$tool" ]; then
|
||||
# echo "Found: $dir/$tool";
|
||||
full_toolname="$dir/$tool"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
unset tmpdir
|
||||
unset tmpgnudir
|
||||
unset tmplibdir
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue