mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Enhance MediaBook functions to easily switch roots and library combo.
Minor bug fixes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2634 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c80c2e992a
commit
4671af8ef2
7 changed files with 190 additions and 6 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Thu Nov 13 15:08:13 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* rules.make: Replace dash with underscore for type not target.
|
||||
* openapp.in: Determine host information if necessary.
|
||||
* MediaBook.sh: Save original variables.
|
||||
* config.site (bindirtop): Define.
|
||||
* MediaBook.func (hostinfo, assignpaths): New functions.
|
||||
(librarycombo, systemroot, localroot, userroot): New functions.
|
||||
* GNUmakefile.in (GNUSTEP_INSTALLATION_DIR): Define.
|
||||
|
||||
Thu Nov 13 11:35:31 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* GNUstep.sh.in: Add user and local to PATH. Make user root
|
||||
|
|
|
@ -28,8 +28,9 @@
|
|||
|
||||
include config.make
|
||||
|
||||
GNUSTEP_INSTALLATION_DIR = @prefix@
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
prefix = $(GNUSTEP_INSTALLATION_DIR)
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
|
|
141
MediaBook.func
141
MediaBook.func
|
@ -187,6 +187,10 @@ function c {
|
|||
# Show current MB environment status
|
||||
--status | --statu | --stat | --sta | --st | --s )
|
||||
echo " "
|
||||
echo " System Root: $GNUSTEP_SYSTEM_ROOT"
|
||||
echo " Local Root: $GNUSTEP_LOCAL_ROOT"
|
||||
echo " User Root: $GNUSTEP_USER_ROOT"
|
||||
echo "--------------"
|
||||
echo " System Name: $MB_CUR"
|
||||
echo " Version: $MB_CUR_VER"
|
||||
echo " Description: $MB_SYS"
|
||||
|
@ -490,3 +494,140 @@ function repswitch {
|
|||
echo CVSROOT is $CVSROOT
|
||||
}
|
||||
|
||||
# Determine the host information
|
||||
function hostinfo {
|
||||
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
|
||||
}
|
||||
|
||||
# assign the paths based upon the root variables
|
||||
function assignpaths {
|
||||
|
||||
hostinfo
|
||||
|
||||
PATH=$GNUSTEP_SYSTEM_ROOT/Tools:$MB_ORIG_PATH
|
||||
if [ -n "$GNUSTEP_HOST_CPU" ]
|
||||
then
|
||||
if [ -n "$LIBRARY_COMBO" ]
|
||||
then
|
||||
PATH=$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO:$PATH
|
||||
fi
|
||||
PATH=$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS:$PATH
|
||||
fi
|
||||
|
||||
if [ -n "$GNUSTEP_LOCAL_ROOT" ]
|
||||
then
|
||||
PATH=$GNUSTEP_LOCAL_ROOT/Tools:$PATH
|
||||
if [ -n "$GNUSTEP_HOST_CPU" ]
|
||||
then
|
||||
if [ -n "$LIBRARY_COMBO" ]
|
||||
then
|
||||
PATH=$GNUSTEP_LOCAL_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO:$PATH
|
||||
fi
|
||||
PATH=$GNUSTEP_LOCAL_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS:$PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$GNUSTEP_USER_ROOT" ]
|
||||
then
|
||||
PATH=$GNUSTEP_USER_ROOT/Tools:$PATH
|
||||
if [ -n "$GNUSTEP_HOST_CPU" ]
|
||||
then
|
||||
if [ -n "$LIBRARY_COMBO" ]
|
||||
then
|
||||
PATH=$GNUSTEP_USER_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO:$PATH
|
||||
fi
|
||||
PATH=$GNUSTEP_USER_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS:$PATH
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# switch the LIBRARY_COMBO
|
||||
function librarycombo {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo Need to specify a library combination
|
||||
echo usage: librarycombo name
|
||||
echo current LIBRARY_COMBO is $LIBRARY_COMBO
|
||||
return 0
|
||||
fi
|
||||
|
||||
LIBRARY_COMBO=$1
|
||||
export LIBRARY_COMBO
|
||||
assignpaths
|
||||
}
|
||||
|
||||
# switch the GNUSTEP_SYSTEM_ROOT
|
||||
function systemroot {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo Need to specify a directory name
|
||||
echo usage: systemroot dir
|
||||
echo current GNUSTEP_SYSTEM_ROOT is $GNUSTEP_SYSTEM_ROOT
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -d "$1" ]
|
||||
then
|
||||
GNUSTEP_SYSTEM_ROOT=$1
|
||||
export GNUSTEP_SYSTEM_ROOT
|
||||
assignpaths
|
||||
fi
|
||||
}
|
||||
|
||||
# switch the GNUSTEP_LOCAL_ROOT
|
||||
function localroot {
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo GNUSTEP_LOCAL_ROOT was $GNUSTEP_LOCAL_ROOT
|
||||
echo making GNUSTEP_LOCAL_ROOT be NULL
|
||||
GNUSTEP_LOCAL_ROOT=
|
||||
export GNUSTEP_LOCAL_ROOT
|
||||
assignpaths
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -d $1 ]
|
||||
then
|
||||
GNUSTEP_LOCAL_ROOT=$1
|
||||
export GNUSTEP_LOCAL_ROOT
|
||||
assignpaths
|
||||
fi
|
||||
}
|
||||
|
||||
# switch the GNUSTEP_USER_ROOT
|
||||
function userroot {
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo GNUSTEP_USER_ROOT was $GNUSTEP_USER_ROOT
|
||||
echo making GNUSTEP_USER_ROOT be NULL
|
||||
GNUSTEP_USER_ROOT=
|
||||
export GNUSTEP_USER_ROOT
|
||||
assignpaths
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -d $1 ]
|
||||
then
|
||||
GNUSTEP_USER_ROOT=$1
|
||||
export GNUSTEP_USER_ROOT
|
||||
assignpaths
|
||||
fi
|
||||
}
|
13
MediaBook.sh
13
MediaBook.sh
|
@ -28,12 +28,19 @@ fi
|
|||
|
||||
export MB_ROOT
|
||||
|
||||
#
|
||||
# Save the original environment variables
|
||||
#
|
||||
MB_ORIG_PATH=$PATH
|
||||
MB_ORIG_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
|
||||
export MB_ORIG_PATH MB_PROD_LD_LIBRARY_PATH
|
||||
|
||||
#
|
||||
# GCC environment variables
|
||||
#
|
||||
GCC_EXEC_PREFIX=$GNUSTEP_SYSTEM_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/gcc-lib/
|
||||
|
||||
export GCC_EXEC_PREFIX
|
||||
#GCC_EXEC_PREFIX=$GNUSTEP_SYSTEM_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/gcc-lib/
|
||||
#export GCC_EXEC_PREFIX
|
||||
|
||||
#
|
||||
# variables for current system directories
|
||||
|
|
|
@ -51,9 +51,11 @@ fi
|
|||
# Change the binary directory default
|
||||
if test "$bindir" = "\${exec_prefix}/bin" ; then
|
||||
bindir="\${exec_prefix}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}"
|
||||
bindirtop="\${exec_prefix}/Tools"
|
||||
fi
|
||||
if test "$DIR_BIN" = "/usr/local/bin" ; then
|
||||
DIR_BIN="${prefix}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}"
|
||||
bindirtop="\${exec_prefix}/Tools"
|
||||
fi
|
||||
|
||||
# xxx What about sbin?
|
||||
|
|
23
openapp.in
23
openapp.in
|
@ -70,6 +70,29 @@ if [ -f "$full_appname/library_paths.openapp" ]; then
|
|||
additional_library_paths="`cat $full_appname/library_paths.openapp`"
|
||||
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
|
||||
|
||||
appname=`echo $app | sed 's/\.[a-z]*$//'`
|
||||
. $GNUSTEP_SYSTEM_ROOT/Makefiles/ld_lib_path.sh
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
# libgmodel.all.library.variables
|
||||
#
|
||||
%.variables:
|
||||
@(target=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\1/' | tr - _`; \
|
||||
@(target=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\1/'`; \
|
||||
operation=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\2/'`; \
|
||||
type=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\3/'`; \
|
||||
type=`echo $* | sed -e 's/\(.*\)\.\(.*\)\.\(.*\)/\3/' | tr - _`; \
|
||||
$(MAKE) --no-print-directory --no-keep-going TARGET_TYPE=$$type \
|
||||
OPERATION=$${operation} TARGET=$${target} \
|
||||
PROCESSED_FIRST_TIME=yes $${target}.build)
|
||||
|
|
Loading…
Reference in a new issue