mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
Incorporate multiple roots.
Convert OS, VENDOR, and CPU cleaning to shell scripts. Implement makefile rules for tools. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2433 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8657c0a99
commit
0e964b1be8
16 changed files with 846 additions and 71 deletions
3
ChangeLog
Normal file
3
ChangeLog
Normal file
|
@ -0,0 +1,3 @@
|
|||
Fri Sep 22 15:12:14 2017 Scott Christley <scottc@speedy.net-community.com>
|
||||
|
||||
* ChangeLog: New file.
|
59
GNUstep.sh.in
Executable file
59
GNUstep.sh.in
Executable file
|
@ -0,0 +1,59 @@
|
|||
#
|
||||
# GNUstep.sh.in
|
||||
#
|
||||
# Shell initialization for the GNUstep environment.
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Set the GNUstep system root and local root
|
||||
#
|
||||
GNUSTEP_SYSTEM_ROOT=@prefix@
|
||||
GNUSTEP_LOCAL_ROOT=@prefix@/Local
|
||||
GNUSTEP_USER_ROOT=~
|
||||
export GNUSTEP_SYSTEM_ROOT GNUSTEP_LOCAL_ROOT GNUSTEP_USER_ROOT
|
||||
|
||||
#
|
||||
# Determine the host information
|
||||
#
|
||||
GNUSTEP_HOST=`$GNUSTEP_SYSTEM_ROOT/Makefiles/config.guess`
|
||||
GNUSTEP_HOST_CPU=`$GNUSTEP_SYSTEM_ROOT/Makefiles/cpu.sh $GNUSTEP_HOST`
|
||||
GNUSTEP_HOST_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Makefiles/vendor.sh $GNUSTEP_HOST`
|
||||
GNUSTEP_HOST_OS=`$GNUSTEP_SYSTEM_ROOT/Makefiles/os.sh $GNUSTEP_HOST`
|
||||
|
||||
# Clean the host
|
||||
GNUSTEP_HOST_CPU=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_cpu.sh $GNUSTEP_HOST_CPU`
|
||||
GNUSTEP_HOST_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_vendor.sh $GNUSTEP_HOST_VENDOR`
|
||||
GNUSTEP_HOST_OS=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_os.sh $GNUSTEP_HOST_OS`
|
||||
|
||||
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/$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
|
||||
|
||||
#
|
||||
# Perform any user initialization
|
||||
#
|
||||
if [ -e ~/.GNUstep/GNUstep.sh ]
|
||||
then
|
||||
. ~/.GNUstep/GNUstep.sh
|
||||
fi
|
25
Makefile.in
25
Makefile.in
|
@ -28,11 +28,18 @@
|
|||
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
includedir = @includedir@
|
||||
datadir = @datadir@
|
||||
|
||||
GNUSTEP_TARGET_CPU = @target_cpu@
|
||||
GNUSTEP_TARGET_OS = @target_os@
|
||||
GNUSTEP_TARGET_CPU := @target_cpu@
|
||||
GNUSTEP_TARGET_OS := @target_os@
|
||||
|
||||
include clean.make
|
||||
GNUSTEP_TARGET_CPU := $(shell clean_cpu.sh $(GNUSTEP_TARGET_CPU))
|
||||
GNUSTEP_TARGET_VENDOR := $(shell clean_vendor.sh $(GNUSTEP_TARGET_VENDOR))
|
||||
GNUSTEP_TARGET_OS := $(shell clean_os.sh $(GNUSTEP_TARGET_OS))
|
||||
|
||||
makedir = $(prefix)/Makefiles
|
||||
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
||||
|
@ -44,12 +51,16 @@ all:
|
|||
install:
|
||||
$(srcdir)/mkinstalldirs $(prefix) $(makedir) \
|
||||
$(makedir)/$(GNUSTEP_TARGET_CPU) \
|
||||
$(makedir)/$(GNUSTEP_TARGET_DIR)
|
||||
$(makedir)/$(GNUSTEP_TARGET_DIR) \
|
||||
$(prefix)/share
|
||||
cp config.guess $(makedir)
|
||||
cp config.sub $(makedir)
|
||||
cp cpu.sh $(makedir)
|
||||
cp vendor.sh $(makedir)
|
||||
cp os.sh $(makedir)
|
||||
cp clean_cpu.sh $(makedir)
|
||||
cp clean_vendor.sh $(makedir)
|
||||
cp clean_os.sh $(makedir)
|
||||
cp install-sh $(makedir)
|
||||
cp mkinstalldirs $(makedir)
|
||||
cp aggregate.make $(makedir)
|
||||
|
@ -63,6 +74,12 @@ install:
|
|||
cp target.make $(makedir)
|
||||
cp tool.make $(makedir)
|
||||
cp config.make $(makedir)/$(GNUSTEP_TARGET_DIR)
|
||||
cp GNUstep.sh $(makedir)
|
||||
chmod +x $(makedir)/GNUstep.sh
|
||||
cp config.site $(prefix)/share
|
||||
cp MediaBook.func $(makedir)
|
||||
cp MediaBook.sh $(makedir)
|
||||
chmod +x $(makedir)/MediaBook.sh
|
||||
|
||||
uninstall:
|
||||
rm -rf $(makedir)
|
||||
|
|
492
MediaBook.func
Normal file
492
MediaBook.func
Normal file
|
@ -0,0 +1,492 @@
|
|||
#
|
||||
# MediaBook.func
|
||||
#
|
||||
# BASH functions for the MediaBook environment
|
||||
#
|
||||
# Copyright (C) 1997 NET-Community
|
||||
#
|
||||
# Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Change to a different version for the current system
|
||||
#
|
||||
function ver {
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo Need to specify a version number
|
||||
echo Or \"default\" for the default version
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -z $MB_CUR ]
|
||||
then
|
||||
echo No current system!
|
||||
return 0
|
||||
fi
|
||||
|
||||
# default version
|
||||
pushd $MB_CUR_SYS >/dev/null
|
||||
if [ $1 = default ]
|
||||
then
|
||||
if [ -e MB.version ]
|
||||
then
|
||||
MB_CUR_VER=`cat MB.version`
|
||||
fi
|
||||
|
||||
# Abort if no default version
|
||||
if [ -z $MB_CUR_VER ]
|
||||
then
|
||||
echo No default version!
|
||||
popd >/dev/null
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
# An explicit version
|
||||
if [ -e $1 ]
|
||||
then
|
||||
MB_CUR_VER=$1
|
||||
else
|
||||
echo Version $1 does not exist!
|
||||
popd >/dev/null
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
popd >/dev/null
|
||||
|
||||
# Set the current system directories
|
||||
MB_CUR_TOP=$MB_CUR_SYS/$MB_CUR_VER
|
||||
|
||||
# Apps
|
||||
if [ -d $MB_CUR_TOP/Apps ]
|
||||
then
|
||||
MB_CUR_BIN=$MB_CUR_TOP/Apps
|
||||
else if [ -d $MB_CUR_TOP/bin ]
|
||||
then
|
||||
MB_CUR_BIN=$MB_CUR_TOP/bin
|
||||
else
|
||||
MB_CUR_BIN=$MB_CUR_TOP
|
||||
fi fi
|
||||
|
||||
# Source
|
||||
if [ -d $MB_CUR_TOP/Source ]
|
||||
then
|
||||
MB_CUR_SOU=$MB_CUR_TOP/Source
|
||||
else if [ -d $MB_CUR_TOP/src ]
|
||||
then
|
||||
MB_CUR_SOU=$MB_CUR_TOP/src
|
||||
else
|
||||
MB_CUR_SOU=$MB_CUR_TOP
|
||||
fi fi
|
||||
|
||||
# Headers
|
||||
if [ -d $MB_CUR_TOP/Headers/$MB_CUR ]
|
||||
then
|
||||
MB_CUR_H=$MB_CUR_TOP/Headers/$MB_CUR
|
||||
else if [ -d $MB_CUR_TOP/Headers ]
|
||||
then
|
||||
MB_CUR_H=$MB_CUR_TOP/Headers
|
||||
else if [ -d $MB_CUR_TOP/include/$MB_CUR ]
|
||||
then
|
||||
MB_CUR_H=$MB_CUR_TOP/include/$MB_CUR
|
||||
else if [ -d $MB_CUR_TOP/include ]
|
||||
then
|
||||
MB_CUR_H=$MB_CUR_TOP/include
|
||||
else
|
||||
MB_CUR_H=$MB_CUR_TOP
|
||||
fi fi fi fi
|
||||
|
||||
# Tests
|
||||
if [ -d $MB_CUR_TOP/Testing ]
|
||||
then
|
||||
MB_CUR_TST=$MB_CUR_TOP/Testing
|
||||
else if [ -d $MB_CUR_TOP/checks ]
|
||||
then
|
||||
MB_CUR_TST=$MB_CUR_TOP/checks
|
||||
else
|
||||
MB_CUR_TST=$MB_CUR_TOP
|
||||
fi fi
|
||||
|
||||
# Documentation
|
||||
if [ -d $MB_CUR_TOP/Documentation ]
|
||||
then
|
||||
MB_CUR_DOC=$MB_CUR_TOP/Documentation
|
||||
else if [ -d $MB_CUR_TOP/doc ]
|
||||
then
|
||||
MB_CUR_DOC=$MB_CUR_TOP/doc
|
||||
else
|
||||
MB_CUR_DOC=$MB_CUR_TOP
|
||||
fi fi
|
||||
|
||||
if [ -e $MB_CUR_TOP ]
|
||||
then
|
||||
cd $MB_CUR_TOP
|
||||
else
|
||||
echo Current version directory does not exist!
|
||||
cd $MB_CUR_SYS
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Functions for moving between systems
|
||||
#
|
||||
function c {
|
||||
case $1 in
|
||||
# Show help
|
||||
--help | --hel | --he | --h )
|
||||
echo " "
|
||||
echo "Parameters"
|
||||
echo "----------"
|
||||
echo "--help : Show help"
|
||||
echo "--status : Show environment status"
|
||||
echo "--list : List available source systems"
|
||||
echo " "
|
||||
echo "Usage"
|
||||
echo "-----"
|
||||
echo "c name : Where 'name' is a system name"
|
||||
echo " or environment directory;"
|
||||
echo " list systems and directories"
|
||||
echo " with --list parameter."
|
||||
echo " "
|
||||
echo "Additional Shell Functions"
|
||||
echo "--------------------------"
|
||||
echo "c : Move between system and directories"
|
||||
echo " within the MediaBook Environment."
|
||||
echo "ver : Move to different version directory"
|
||||
echo " within the same source system."
|
||||
echo "sys : Move to top-leve directory"
|
||||
echo " for the current source system."
|
||||
echo "devswitch : Change Development root."
|
||||
echo "prodswitch: Change Production root."
|
||||
echo " "
|
||||
echo "These commands move between various directories"
|
||||
echo "within the current source system version."
|
||||
echo " "
|
||||
echo "bin : Move to bin or Apps"
|
||||
echo "h : Move to include or Headers"
|
||||
echo "sou : Move to src or Source"
|
||||
echo "tst : Move to checks or Testing"
|
||||
echo "doc : Move to doc or Documentation"
|
||||
echo "gde : Move to version root"
|
||||
echo " "
|
||||
;;
|
||||
|
||||
# Show current MB environment status
|
||||
--status | --statu | --stat | --sta | --st | --s )
|
||||
echo " "
|
||||
echo " System Name: $MB_CUR"
|
||||
echo " Version: $MB_CUR_VER"
|
||||
echo " Description: $MB_SYS"
|
||||
echo "--------------"
|
||||
echo " Current: $PWD"
|
||||
echo " Version Top: $MB_CUR_TOP"
|
||||
echo " Source: $MB_CUR_SOU"
|
||||
echo " Headers: $MB_CUR_H"
|
||||
echo " Tests: $MB_CUR_TST"
|
||||
echo "Documentation: $MB_CUR_DOC"
|
||||
echo " CVS Root: $CVSROOT"
|
||||
echo " "
|
||||
return
|
||||
;;
|
||||
|
||||
# List Systems
|
||||
--list | --lis | --li | --l )
|
||||
pushd $MB_ROOT >/dev/null
|
||||
echo " "
|
||||
echo "Directories"
|
||||
echo "-----------"
|
||||
echo "apps : System Applications"
|
||||
echo "localapps : Local Applications"
|
||||
echo "userapps : User Applications"
|
||||
echo "tools : System Command Line Tools"
|
||||
echo "localtools : Local Command Line Tools"
|
||||
echo "usertools : User Command Line Tools"
|
||||
echo "libs : System Libraries"
|
||||
echo "locallibs : Local Libraries"
|
||||
echo "userlibs : User Libraries"
|
||||
echo "head : System Headers"
|
||||
echo "localhead : Local Headers"
|
||||
echo "userhead : User Headers"
|
||||
echo "source : Development Source"
|
||||
echo " "
|
||||
echo "List of Available Source Systems"
|
||||
echo -e "Name \t\t Description"
|
||||
echo -e "------------ \t -------------------------"
|
||||
for dir in [ * ]
|
||||
do
|
||||
if [ -d $dir ]
|
||||
then
|
||||
pushd $dir >/dev/null
|
||||
# Get system description
|
||||
if [ -e MB.name ]
|
||||
then
|
||||
temp=`cat MB.name`
|
||||
len=${#dir}
|
||||
if [ $len -lt 8 ]
|
||||
then
|
||||
tabtmp="\t\t"
|
||||
else
|
||||
tabtmp="\t"
|
||||
fi
|
||||
echo -e "$dir$tabtmp: $temp"
|
||||
fi
|
||||
popd >/dev/null
|
||||
fi
|
||||
done
|
||||
echo " "
|
||||
echo "Type 'c name' to goto that system."
|
||||
echo " "
|
||||
popd >/dev/null
|
||||
return
|
||||
;;
|
||||
|
||||
# System apps
|
||||
apps )
|
||||
cd $GNUSTEP_SYSTEM_ROOT/Apps
|
||||
return
|
||||
;;
|
||||
# Local apps
|
||||
localapps )
|
||||
cd $GNUSTEP_LOCAL_ROOT/Apps
|
||||
return
|
||||
;;
|
||||
# System command line tools
|
||||
tools )
|
||||
cd $GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
|
||||
return
|
||||
;;
|
||||
# Local command line tools
|
||||
localtools )
|
||||
cd $GNUSTEP_LOCAL_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
|
||||
return
|
||||
;;
|
||||
# System libraries
|
||||
libs )
|
||||
cd $GNUSTEP_SYSTEM_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
|
||||
return
|
||||
;;
|
||||
# Local libraries
|
||||
locallibs )
|
||||
cd $GNUSTEP_LOCAL_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
|
||||
return
|
||||
;;
|
||||
# System headers
|
||||
head )
|
||||
cd $GNUSTEP_SYSTEM_ROOT/Headers
|
||||
return
|
||||
;;
|
||||
# Local headers
|
||||
localhead )
|
||||
cd $GNUSTEP_LOCAL_ROOT/Headers
|
||||
return
|
||||
;;
|
||||
# Development directory
|
||||
source )
|
||||
cd $MB_ROOT
|
||||
return
|
||||
;;
|
||||
# MB systems
|
||||
* )
|
||||
# Perform any user initialization
|
||||
if [ -e ~/MB.init ]
|
||||
then
|
||||
. ~/MB.init
|
||||
fi
|
||||
|
||||
pushd $MB_ROOT >/dev/null
|
||||
if [ -e $1 ]
|
||||
then
|
||||
popd >/dev/null
|
||||
|
||||
if [ -z $1 ]
|
||||
then
|
||||
pwd
|
||||
return
|
||||
fi
|
||||
|
||||
HOLD_CUR=$MB_CUR
|
||||
MB_CUR=$1
|
||||
pushd $MB_ROOT/$1 >/dev/null
|
||||
|
||||
# Get system description
|
||||
HOLD_SYS=$MB_SYS
|
||||
if [ -e MB.name ]
|
||||
then
|
||||
MB_SYS=`cat MB.name`
|
||||
else
|
||||
MB_SYS=
|
||||
fi
|
||||
|
||||
HOLD_CUR_SYS=$MB_CUR_SYS
|
||||
MB_CUR_SYS=$MB_ROOT/$MB_CUR
|
||||
|
||||
# Get default version
|
||||
HOLD_CUR_VER=$MB_CUR_VER
|
||||
MB_CUR_VER=
|
||||
ver default
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
MB_CUR=$HOLD_CUR
|
||||
MB_SYS=$HOLD_SYS
|
||||
MB_CUR_SYS=$HOLD_CUR_SYS
|
||||
MB_CUR_VER=$HOLD_CUR_VER
|
||||
popd >/dev/null
|
||||
return
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
if [ -e $MB_CUR_TOP ]
|
||||
then
|
||||
cd $MB_CUR_TOP
|
||||
else
|
||||
cd $MB_CUR_SYS
|
||||
fi
|
||||
|
||||
# If there is an MB.init shell file
|
||||
# then execute for system customizations
|
||||
if [ -f $MB_CUR_SYS/MB.init ]
|
||||
then
|
||||
. $MB_CUR_SYS/MB.init
|
||||
fi
|
||||
else
|
||||
# no system then just return
|
||||
popd >/dev/null
|
||||
echo Unknown system or command
|
||||
echo Type \"c --help\" for help
|
||||
return
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Go to apps directory for current system
|
||||
function bin {
|
||||
if [ -n $MB_CUR_BIN ]
|
||||
then
|
||||
cd $MB_CUR_BIN
|
||||
fi
|
||||
}
|
||||
|
||||
# Go to source directory for current system
|
||||
function sou {
|
||||
if [ -n $MB_CUR_SOU ]
|
||||
then
|
||||
cd $MB_CUR_SOU
|
||||
fi
|
||||
}
|
||||
|
||||
# Go to test directory for current system
|
||||
function tst {
|
||||
if [ -n $MB_CUR_TST ]
|
||||
then
|
||||
cd $MB_CUR_TST
|
||||
fi
|
||||
}
|
||||
|
||||
# Go to headers directory for current system
|
||||
function h {
|
||||
if [ -n $MB_CUR_H ]
|
||||
then
|
||||
cd $MB_CUR_H
|
||||
fi
|
||||
}
|
||||
|
||||
# Go to documentation directory for current system
|
||||
function doc {
|
||||
if [ -n $MB_CUR_DOC ]
|
||||
then
|
||||
cd $MB_CUR_DOC
|
||||
fi
|
||||
}
|
||||
|
||||
# Go to the top level directory for current system
|
||||
function sys {
|
||||
if [ -n $MB_CUR_SYS ]
|
||||
then
|
||||
cd $MB_CUR_SYS
|
||||
fi
|
||||
}
|
||||
|
||||
# Go to the version directory for current system
|
||||
function gde {
|
||||
if [ -n $MB_CUR_TOP ]
|
||||
then
|
||||
cd $MB_CUR_TOP
|
||||
fi
|
||||
}
|
||||
|
||||
# Switch development directories
|
||||
function devswitch {
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo Need to specify a new development directory
|
||||
echo usage: devswitch directory
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -d $1 ]
|
||||
then
|
||||
# Set the development directory and reset the paths
|
||||
MB_ROOT=$1
|
||||
|
||||
#OBJC_INCLUDE_PATH=$MB_DEV/$MB_H/$MB_OS:$MB_PROD/$MB_H/$MB_OS:$MB_DEV/$MB_H:$MB_PROD/$MB_H
|
||||
|
||||
#C_INCLUDE_PATH=$MB_DEV/$MB_H/$MB_OS:$MB_PROD/$MB_H/$MB_OS:$MB_DEV/$MB_H:$MB_PROD/$MB_H
|
||||
|
||||
#CPLUS_INCLUDE_PATH=$MB_DEV/$MB_H/$MB_OS:$MB_PROD/$MB_H/$MB_OS:$MB_DEV/$MB_H:$MB_PROD/$MB_H
|
||||
|
||||
#LIBRARY_PATH=$MB_DEV/$MB_LIB:$MB_PROD/$MB_LIB
|
||||
|
||||
# Clear variables for current system
|
||||
MB_SYS=
|
||||
MB_CUR=
|
||||
MB_CUR_SYS=
|
||||
MB_CUR_TOP=
|
||||
MB_CUR_VER=
|
||||
MB_CUR_SOU=
|
||||
MB_CUR_H=
|
||||
MB_CUR_TST=
|
||||
MB_CUR_DOC=
|
||||
else
|
||||
echo Directory does not exist or is a file
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Switch repository
|
||||
#
|
||||
# single parameter which is CVS repository alias.
|
||||
# Looks for file with alias name and cvs extension
|
||||
# in the $MB_PROD/share directory
|
||||
#
|
||||
function repswitch {
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo Need to specify a repository alias name
|
||||
echo usage: repswitch name
|
||||
echo current CVSROOT is $CVSROOT
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -f $GNUSTEP_SYSTEM_ROOT/share/$1.cvs ]; then
|
||||
. $GNUSTEP_SYSTEM_ROOT/share/$1.cvs
|
||||
else
|
||||
echo No $1.cvs file
|
||||
fi
|
||||
|
||||
echo CVSROOT is $CVSROOT
|
||||
}
|
||||
|
62
MediaBook.sh
Normal file
62
MediaBook.sh
Normal file
|
@ -0,0 +1,62 @@
|
|||
#
|
||||
# MediaBook.sh
|
||||
#
|
||||
# Variable initialization for the MediaBook environment
|
||||
#
|
||||
# Copyright (C) 1997 NET-Community
|
||||
#
|
||||
# Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
if [ -z $1 ]; then
|
||||
MB_ROOT=~
|
||||
else
|
||||
MB_ROOT=$1
|
||||
fi
|
||||
|
||||
export MB_ROOT
|
||||
|
||||
#
|
||||
# GCC environment variables
|
||||
#
|
||||
GCC_EXEC_PREFIX=$GNUSTEP_SYSTEM_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/gcc-lib/
|
||||
|
||||
export GCC_EXEC_PREFIX
|
||||
|
||||
#
|
||||
# variables for current system directories
|
||||
#
|
||||
MB_SYS=
|
||||
MB_CUR=
|
||||
MB_CUR_SYS=
|
||||
MB_CUR_TOP=
|
||||
MB_CUR_VER=
|
||||
MB_CUR_SOU=
|
||||
MB_CUR_H=
|
||||
MB_CUR_TST=
|
||||
MB_CUR_DOC=
|
||||
MB_CUR_BIN=
|
||||
|
||||
export MB_SYS MB_CUR
|
||||
export MB_CUR_SYS MB_CUR_TOP
|
||||
export MB_CUR_VER MB_CUR_SOU MB_CUR_H MB_CUR_TST MB_CUR_DOC MB_CUR_BIN
|
||||
|
||||
#
|
||||
# Perform any user initialization
|
||||
#
|
||||
if [ -e ~/MB.init ]
|
||||
then
|
||||
. ~/MB.init
|
||||
fi
|
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/rules.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
#
|
||||
# The list of directory names with the subprojects
|
||||
|
@ -35,35 +35,35 @@ include $(GNUSTEP_ROOT)/Makefiles/rules.make
|
|||
internal-all::
|
||||
@(for f in $(SUBPROJECTS); do \
|
||||
echo Making all in $$f...;\
|
||||
(cd $$f; $(MAKE) $(MAKEFLAGS) all); \
|
||||
(cd $$f; $(MAKE) all); \
|
||||
done)
|
||||
|
||||
internal-install::
|
||||
@(for f in $(SUBPROJECTS); do \
|
||||
echo Making install in $$f...;\
|
||||
(cd $$f; $(MAKE) $(MAKEFLAGS) install); \
|
||||
(cd $$f; $(MAKE) install); \
|
||||
done)
|
||||
|
||||
internal-uninstall::
|
||||
@(for f in $(SUBPROJECTS); do \
|
||||
echo Making uninstall in $$f...;\
|
||||
(cd $$f; $(MAKE) $(MAKEFLAGS) uninstall); \
|
||||
(cd $$f; $(MAKE) uninstall); \
|
||||
done)
|
||||
|
||||
internal-clean::
|
||||
@(for f in $(SUBPROJECTS); do \
|
||||
echo Making clean in $$f...;\
|
||||
(cd $$f; $(MAKE) $(MAKEFLAGS) clean); \
|
||||
(cd $$f; $(MAKE) clean); \
|
||||
done)
|
||||
|
||||
internal-distclean::
|
||||
@(for f in $(SUBPROJECTS); do \
|
||||
echo Making distclean in $$f...;\
|
||||
(cd $$f; $(MAKE) $(MAKEFLAGS) distclean); \
|
||||
(cd $$f; $(MAKE) distclean); \
|
||||
done)
|
||||
|
||||
internal-check::
|
||||
@(for f in $(SUBPROJECTS); do \
|
||||
echo Making check in $$f...;\
|
||||
(cd $$f; $(MAKE) $(MAKEFLAGS) check); \
|
||||
(cd $$f; $(MAKE) check); \
|
||||
done)
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/rules.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
|
||||
|
||||
#
|
||||
# The name of the library is in the LIBRARY_NAME variable.
|
||||
# The name of the library is in the APP_NAME variable.
|
||||
#
|
||||
|
||||
APP_DIR_NAME := $(foreach app,$(APP_NAME),$(app).app)
|
||||
|
|
24
clean.make
24
clean.make
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# clean.make
|
||||
#
|
||||
# Clean up the target names
|
||||
# Clean up the host and target names
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
|
@ -19,16 +19,12 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Intel processors are made equivalent
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i386)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i486)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i586)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i686)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
# Clean up the host names
|
||||
GNUSTEP_HOST_CPU := $(shell $(CLEAN_CPU_SCRIPT) $(GNUSTEP_HOST_CPU))
|
||||
GNUSTEP_HOST_VENDOR := $(shell $(CLEAN_VENDOR_SCRIPT) $(GNUSTEP_HOST_VENDOR))
|
||||
GNUSTEP_HOST_OS := $(shell $(CLEAN_OS_SCRIPT) $(GNUSTEP_HOST_OS))
|
||||
|
||||
# Clean up the target names
|
||||
GNUSTEP_TARGET_CPU := $(shell $(CLEAN_CPU_SCRIPT) $(GNUSTEP_TARGET_CPU))
|
||||
GNUSTEP_TARGET_VENDOR := $(shell $(CLEAN_VENDOR_SCRIPT) $(GNUSTEP_TARGET_VENDOR))
|
||||
GNUSTEP_TARGET_OS := $(shell $(CLEAN_OS_SCRIPT) $(GNUSTEP_TARGET_OS))
|
||||
|
|
33
common.make
33
common.make
|
@ -22,16 +22,19 @@
|
|||
#
|
||||
# Scripts to run for parsing canonical names
|
||||
#
|
||||
CONFIG_GUESS_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/config.guess
|
||||
CONFIG_SUB_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/config.sub
|
||||
CONFIG_CPU_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/cpu.sh
|
||||
CONFIG_VENDOR_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/vendor.sh
|
||||
CONFIG_OS_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/os.sh
|
||||
CONFIG_GUESS_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/config.guess
|
||||
CONFIG_SUB_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/config.sub
|
||||
CONFIG_CPU_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/cpu.sh
|
||||
CONFIG_VENDOR_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/vendor.sh
|
||||
CONFIG_OS_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/os.sh
|
||||
CLEAN_CPU_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/clean_cpu.sh
|
||||
CLEAN_VENDOR_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/clean_vendor.sh
|
||||
CLEAN_OS_SCRIPT = $(GNUSTEP_SYSTEM_ROOT)/Makefiles/clean_os.sh
|
||||
|
||||
#
|
||||
# Determine the compilation host and target
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/target.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/target.make
|
||||
|
||||
GNUSTEP_HOST_DIR = $(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)
|
||||
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
||||
|
@ -39,22 +42,22 @@ GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
|||
#
|
||||
# Get the config information
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/$(GNUSTEP_TARGET_DIR)/config.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/$(GNUSTEP_TARGET_DIR)/config.make
|
||||
|
||||
#
|
||||
# Determine the core libraries
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/core.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/core.make
|
||||
|
||||
#
|
||||
# Variables specifying the installation directory paths
|
||||
#
|
||||
GNUSTEP_APPS = $(GNUSTEP_ROOT)/Apps
|
||||
GNUSTEP_TOOLS = $(GNUSTEP_ROOT)/Tools
|
||||
GNUSTEP_HEADERS = $(GNUSTEP_ROOT)/Headers
|
||||
GNUSTEP_LIBRARIES_ROOT = $(GNUSTEP_ROOT)/Libraries
|
||||
GNUSTEP_APPS = $(GNUSTEP_SYSTEM_ROOT)/Apps
|
||||
GNUSTEP_TOOLS = $(GNUSTEP_SYSTEM_ROOT)/Tools
|
||||
GNUSTEP_HEADERS = $(GNUSTEP_SYSTEM_ROOT)/Headers
|
||||
GNUSTEP_LIBRARIES_ROOT = $(GNUSTEP_SYSTEM_ROOT)/Libraries
|
||||
GNUSTEP_LIBRARIES = $(GNUSTEP_LIBRARIES_ROOT)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)
|
||||
GNUSTEP_MAKEFILES = $(GNUSTEP_ROOT)/Makefiles
|
||||
GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
|
||||
|
||||
#
|
||||
# Determine Foundation header subdirectory based upon library combo
|
||||
|
@ -87,8 +90,8 @@ GNUSTEP_HEADERS_GUI = $(GNUSTEP_HEADERS)$(APP_HEADER)
|
|||
#
|
||||
DEBUGFLAG = -g
|
||||
OPTFLAG = -O2
|
||||
OBJCFLAGS = -Wno-implicit -Wno-import -Wall
|
||||
CFLAGS = -Wall
|
||||
OBJCFLAGS = -Wno-implicit -Wno-import
|
||||
CFLAGS =
|
||||
|
||||
ifeq ($(OBJC_RUNTIME_LIB),gnu)
|
||||
RUNTIME_FLAG = -fgnu-runtime
|
||||
|
|
92
config.site
Normal file
92
config.site
Normal file
|
@ -0,0 +1,92 @@
|
|||
#
|
||||
# config.site
|
||||
#
|
||||
# GNUstep site configuration. This allows Autoconf packages to
|
||||
# be installed within the GNUstep directory structure.
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
echo Processing GNUstep site configuration
|
||||
|
||||
# Determine the target
|
||||
if test "$target" = NONE ; then
|
||||
# The did not specify one so the target is the host
|
||||
GNUSTEP_TARGET=$GNUSTEP_HOST
|
||||
GNUSTEP_TARGET_CPU=$GNUSTEP_HOST_CPU
|
||||
GNUSTEP_TARGET_VENDOR=$GNUSTEP_HOST_VENDOR
|
||||
GNUSTEP_TARGET_OS=$GNUSTEP_HOST_OS
|
||||
else
|
||||
# The user did specify a target, so canonicalize and clean
|
||||
GNUSTEP_TARGET=`$GNUSTEP_SYSTEM_ROOT/Makefiles/config.sub $target`
|
||||
GNUSTEP_TARGET_CPU=`$GNUSTEP_SYSTEM_ROOT/Makefiles/cpu.sh $target`
|
||||
GNUSTEP_TARGET_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Makefiles/vendor.sh $target`
|
||||
GNUSTEP_TARGET_OS=`$GNUSTEP_SYSTEM_ROOT/Makefiles/os.sh $target`
|
||||
fi
|
||||
|
||||
# Clean the target
|
||||
GNUSTEP_TARGET_OS=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_os.sh $GNUSTEP_TARGET_OS`
|
||||
GNUSTEP_TARGET_VENDOR=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_vendor.sh $GNUSTEP_TARGET_VENDOR`
|
||||
GNUSTEP_TARGET_CPU=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_cpu.sh $GNUSTEP_TARGET_CPU`
|
||||
|
||||
# Set the installation prefix
|
||||
if test "$prefix" = NONE ; then
|
||||
prefix="${GNUSTEP_SYSTEM_ROOT}"
|
||||
fi
|
||||
|
||||
# Change the binary directory default
|
||||
if test "$bindir" = "\${exec_prefix}/bin" ; then
|
||||
bindir="\${exec_prefix}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}"
|
||||
fi
|
||||
if test "$DIR_BIN" = "/usr/local/bin" ; then
|
||||
DIR_BIN="${prefix}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}"
|
||||
fi
|
||||
|
||||
# xxx What about sbin?
|
||||
# xxx What about libexec?
|
||||
|
||||
# Change the data directory default
|
||||
if test "$datadir" = "\${prefix}/share" ; then
|
||||
datadir="${prefix}/Libraries/share"
|
||||
fi
|
||||
|
||||
# xxx What about sysconfdir?
|
||||
# xxx What about sharedstatedir?
|
||||
# xxx What about localstatedir?
|
||||
|
||||
# Change the library directory default
|
||||
if test "$libdir" = "\${exec_prefix}/lib" ; then
|
||||
libdir="\${exec_prefix}/Libraries/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}"
|
||||
fi
|
||||
|
||||
# Change the include directory default
|
||||
if test "$includedir" = "\${prefix}/include" ; then
|
||||
includedir="\${prefix}/Headers"
|
||||
fi
|
||||
|
||||
# xxx What about oldincludedir?
|
||||
|
||||
# Change the info directory default
|
||||
if test "$infodir" = "\${prefix}/info" ; then
|
||||
infodir="${prefix}/Library/info"
|
||||
fi
|
||||
|
||||
# Change the man directory default
|
||||
if test "$mandir" = "\${prefix}/man" ; then
|
||||
mandir="${prefix}/Library/man"
|
||||
fi
|
||||
|
12
configure
vendored
12
configure
vendored
|
@ -11,10 +11,10 @@
|
|||
ac_help=
|
||||
ac_default_prefix=/usr/local
|
||||
# Any additions from configure.in:
|
||||
ac_default_prefix=`if test "x$GNUSTEP_ROOT" = "x"; then
|
||||
ac_default_prefix=`if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
|
||||
echo /usr/GNUstep ;
|
||||
else
|
||||
echo $GNUSTEP_ROOT ;
|
||||
echo $GNUSTEP_SYSTEM_ROOT ;
|
||||
fi`
|
||||
ac_help="$ac_help
|
||||
--with-x use the X Window System"
|
||||
|
@ -547,8 +547,8 @@ fi
|
|||
|
||||
#--------------------------------------------------------------------
|
||||
# The GNUstep root directory.
|
||||
# The user should have the GNUSTEP_ROOT environment variable defined,
|
||||
# but if not then we have a global default.
|
||||
# The user should have the GNUSTEP_SYSTEM_ROOT environment variable
|
||||
# defined, but if not then we have a global default.
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -1392,7 +1392,7 @@ done
|
|||
ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "config.make Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "config.make Makefile GNUstep.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
|
@ -1486,7 +1486,7 @@ EOF
|
|||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"config.make Makefile"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"config.make Makefile GNUstep.sh"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
|
10
configure.in
10
configure.in
|
@ -21,13 +21,13 @@ AC_INIT(application.make)
|
|||
|
||||
#--------------------------------------------------------------------
|
||||
# The GNUstep root directory.
|
||||
# The user should have the GNUSTEP_ROOT environment variable defined,
|
||||
# but if not then we have a global default.
|
||||
# The user should have the GNUSTEP_SYSTEM_ROOT environment variable
|
||||
# defined, but if not then we have a global default.
|
||||
#--------------------------------------------------------------------
|
||||
AC_PREFIX_DEFAULT(`if test "x$GNUSTEP_ROOT" = "x"; then
|
||||
AC_PREFIX_DEFAULT(`if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
|
||||
echo /usr/GNUstep ;
|
||||
else
|
||||
echo $GNUSTEP_ROOT ;
|
||||
echo $GNUSTEP_SYSTEM_ROOT ;
|
||||
fi`)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -80,4 +80,4 @@ AC_SUBST(X_LIBS)
|
|||
#--------------------------------------------------------------------
|
||||
# Produce the output files
|
||||
#--------------------------------------------------------------------
|
||||
AC_OUTPUT(config.make Makefile)
|
||||
AC_OUTPUT(config.make Makefile GNUstep.sh)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/rules.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
#
|
||||
# The name of the library is in the LIBRARY_NAME variable.
|
||||
|
|
14
rules.make
14
rules.make
|
@ -22,11 +22,11 @@
|
|||
ALL_CPPFLAGS = $(CPPFLAGS) $(ADDITIONAL_CPPFLAGS)
|
||||
|
||||
ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) $(SYSTEM_INCLUDES) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) -I. $(SYSTEM_INCLUDES) \
|
||||
-I$(GNUSTEP_HEADERS_FND) -I$(GNUSTEP_HEADERS_GUI) -I$(GNUSTEP_HEADERS)
|
||||
|
||||
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(ADDITIONAL_CFLAGS) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) $(SYSTEM_INCLUDES) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) -I. $(SYSTEM_INCLUDES) \
|
||||
-I$(GNUSTEP_HEADERS_FND) -I$(GNUSTEP_HEADERS_GUI) -I$(GNUSTEP_HEADERS)
|
||||
|
||||
ALL_LDFLAGS = $(INTERNAL_LDFLAGS) $(ADDITIONAL_LDFLAGS) \
|
||||
|
@ -63,12 +63,20 @@ ALL_GUI_LIBS = $(ADDITIONAL_GUI_LIBS) $(BACKEND_LIBS) $(GUI_LIBS) \
|
|||
# The magical app rule, thank you GNU make!
|
||||
%.app : FORCE
|
||||
@echo Making $*...
|
||||
$(MAKE) internal-app-all $(MAKEFLAGS) \
|
||||
@$(MAKE) internal-app-all \
|
||||
APP_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)"
|
||||
|
||||
%.tool : FORCE
|
||||
@echo Making $*...
|
||||
@$(MAKE) internal-tool-all \
|
||||
TOOL_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)"
|
||||
|
||||
#
|
||||
# The list of Objective-C source files to be compiled
|
||||
# are in the OBJC_FILES variable.
|
||||
|
|
28
target.make
28
target.make
|
@ -21,10 +21,10 @@
|
|||
|
||||
# Run config.guess to guess the host
|
||||
|
||||
GNUSTEP_HOST = $(shell $(CONFIG_GUESS_SCRIPT))
|
||||
GNUSTEP_HOST_CPU = $(shell $(CONFIG_CPU_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST_VENDOR = $(shell $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST_OS = $(shell $(CONFIG_OS_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST := $(shell $(CONFIG_GUESS_SCRIPT))
|
||||
GNUSTEP_HOST_CPU := $(shell $(CONFIG_CPU_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST_VENDOR := $(shell $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST_OS := $(shell $(CONFIG_OS_SCRIPT) $(GNUSTEP_HOST))
|
||||
|
||||
#
|
||||
# The user can specify a `target' variable when running make
|
||||
|
@ -33,10 +33,10 @@ GNUSTEP_HOST_OS = $(shell $(CONFIG_OS_SCRIPT) $(GNUSTEP_HOST))
|
|||
ifeq ($(strip $(target)),)
|
||||
|
||||
# The host is the default target
|
||||
GNUSTEP_TARGET = $(GNUSTEP_HOST)
|
||||
GNUSTEP_TARGET_CPU = $(GNUSTEP_HOST_CPU)
|
||||
GNUSTEP_TARGET_VENDOR = $(GNUSTEP_HOST_VENDOR)
|
||||
GNUSTEP_TARGET_OS = $(GNUSTEP_HOST_OS)
|
||||
GNUSTEP_TARGET := $(GNUSTEP_HOST)
|
||||
GNUSTEP_TARGET_CPU := $(GNUSTEP_HOST_CPU)
|
||||
GNUSTEP_TARGET_VENDOR := $(GNUSTEP_HOST_VENDOR)
|
||||
GNUSTEP_TARGET_OS := $(GNUSTEP_HOST_OS)
|
||||
|
||||
else
|
||||
|
||||
|
@ -44,17 +44,17 @@ else
|
|||
# Parse the target variable
|
||||
#
|
||||
|
||||
GNUSTEP_TARGET = $(shell $(CONFIG_SUB_SCRIPT) $(target))
|
||||
GNUSTEP_TARGET_CPU = $(shell $(CONFIG_CPU_SCRIPT) $(GNUSTEP_TARGET))
|
||||
GNUSTEP_TARGET_VENDOR = $(shell $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_TARGET))
|
||||
GNUSTEP_TARGET_OS = $(shell $(CONFIG_OS_SCRIPT) $(GNUSTEP_TARGET))
|
||||
GNUSTEP_TARGET := $(shell $(CONFIG_SUB_SCRIPT) $(target))
|
||||
GNUSTEP_TARGET_CPU := $(shell $(CONFIG_CPU_SCRIPT) $(GNUSTEP_TARGET))
|
||||
GNUSTEP_TARGET_VENDOR := $(shell $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_TARGET))
|
||||
GNUSTEP_TARGET_OS := $(shell $(CONFIG_OS_SCRIPT) $(GNUSTEP_TARGET))
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# Clean up the target names
|
||||
# Clean up the host and target names
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/clean.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/clean.make
|
||||
|
||||
#
|
||||
# Host and target specific settings
|
||||
|
|
43
tool.make
43
tool.make
|
@ -18,3 +18,46 @@
|
|||
# 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.
|
||||
|
||||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
||||
|
||||
#
|
||||
# The name of the tools is in the TOOL_NAME variable.
|
||||
#
|
||||
# xxx We need to prefix the target name when cross-compiling
|
||||
#
|
||||
TOOL_LIST := $(foreach tool,$(TOOL_NAME),$(tool).tool)
|
||||
TOOL_FILE = $(TOOL_LIST)
|
||||
TOOL_STAMPS := $(foreach tool,$(TOOL_NAME),stamp-tool-$(tool))
|
||||
|
||||
#
|
||||
# Internal targets
|
||||
#
|
||||
|
||||
stamp-tool-% : $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(LD) $(ALL_LDFLAGS) $(LDOUT)$(TOOL_NAME) \
|
||||
$(C_OBJ_FILES) $(OBJC_OBJ_FILES) \
|
||||
$(ALL_LIB_DIRS) $(ALL_TOOL_LIBS)
|
||||
touch $@
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
#
|
||||
internal-all:: $(TOOL_LIST)
|
||||
|
||||
internal-tool-all:: build-tool
|
||||
|
||||
build-tool:: stamp-tool-$(TOOL_NAME)
|
||||
|
||||
#
|
||||
# Cleaning targets
|
||||
#
|
||||
internal-clean::
|
||||
rm -f $(TOOL_NAME)
|
||||
rm -f $(TOOL_STAMPS)
|
||||
|
||||
internal-distclean:: clean
|
||||
|
||||
|
|
Loading…
Reference in a new issue