Made installation mechanism more portable
This commit is contained in:
parent
7f4c0bea38
commit
e35f11f208
11 changed files with 99 additions and 48 deletions
|
@ -1,4 +1,5 @@
|
|||
create_dir
|
||||
cp_dir
|
||||
em_path.h.src
|
||||
first
|
||||
get_answer
|
||||
|
|
16
first/cp_dir
Executable file
16
first/cp_dir
Executable file
|
@ -0,0 +1,16 @@
|
|||
set -e
|
||||
trap "rm -f /tmp/xx$$" 0 1 2 3 15
|
||||
case $2 in
|
||||
/*) target_dir=$2
|
||||
;;
|
||||
*) target_dir=`pwd`/$2
|
||||
;;
|
||||
esac
|
||||
cd $1
|
||||
tar cf /tmp/xx$$ .
|
||||
if [ -d $target_dir ]
|
||||
then :
|
||||
else mkdir $target_dir
|
||||
fi
|
||||
cd $target_dir
|
||||
tar xf /tmp/xx$$
|
|
@ -136,7 +136,6 @@ esac
|
|||
|
||||
echo "Your default machine to compile for is $ACM"
|
||||
|
||||
DISABLE_LANG=
|
||||
echo "Installation of the complete ACK takes a long time. Limiting the
|
||||
number of languages, runtime libraries, back-ends, and assemblers to be
|
||||
installed may save a lot of time. If you want to install everything,
|
||||
|
|
|
@ -60,7 +60,12 @@ MACH = $MACH
|
|||
|
||||
if [ $TARGET_HOME = $UTIL_HOME ]
|
||||
then
|
||||
sed "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" < $FDIR/target_comp >> make_macros
|
||||
if [ -f /bin/ranlib -o -f /usr/bin/ranlib -o -f /usr/ucb/ranlib ]
|
||||
then
|
||||
sed "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" < $FDIR/target_comp >> make_macros
|
||||
else
|
||||
sed -e "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" -e "s/^# RANLIB=:/RANLIB=:/" < $FDIR/target_comp >> make_macros
|
||||
fi
|
||||
if [ -f /bin/arch ]
|
||||
then
|
||||
case `/bin/arch` in
|
||||
|
@ -78,7 +83,12 @@ else
|
|||
case $know_target in
|
||||
1) sed -e "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" -e "/cc-and-mkdep.ack/s/^..//" -e "s/^CC=cc/CC=acc -m$ACM/" -e "s/^# AR=aal/AR=aal/" -e "s/^# RANLIB=:/RANLIB=:/" < $FDIR/target_comp >> make_macros
|
||||
;;
|
||||
*) sed "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" < $FDIR/target_comp >> make_macros
|
||||
*) if [ -f /bin/ranlib -o -f /usr/bin/ranlib -o -f /usr/ucb/ranlib ]
|
||||
then
|
||||
sed "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" < $FDIR/target_comp >> make_macros
|
||||
else
|
||||
sed -e "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS/" -e "s/^# RANLIB=:/RANLIB=:/" < $FDIR/target_comp >> make_macros
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
sed "s/^#U/U/" < $FDIR/util_comp >> make_macros
|
||||
|
|
|
@ -10,6 +10,7 @@ echo "PATH=::$CONFIG/bin:$UTIL_HOME/bin:/bin:/usr/bin:/usr/ucb; export PATH" > $
|
|||
cat $SRC_HOME/TakeAction >> $CONFIG/bin/TakeAction
|
||||
sed '/^#PARAMS/r make_macros' < $SRC_HOME/first/mk_makefile > $CONFIG/bin/mk_makefile
|
||||
cp $SRC_HOME/first/create_dir $CONFIG/bin/create_dir
|
||||
cp $SRC_HOME/first/cp_dir $CONFIG/bin/cp_dir
|
||||
chmod +x $CONFIG/bin/*
|
||||
|
||||
$SRC_HOME/first/mk_config
|
||||
|
|
|
@ -27,14 +27,30 @@ to disable installation of the machine-independent part"
|
|||
;;
|
||||
esac
|
||||
done
|
||||
OLD_DIS_LANG="$DISABLE_LANG"
|
||||
DISABLE_LANG=
|
||||
case X$OLD_DIS_LANG in
|
||||
X) ;;
|
||||
*) set $OLD_DIS_LANG
|
||||
;;
|
||||
esac
|
||||
for i in Modula-2 Pascal Occam Basic ANSI-C C Fortran
|
||||
do
|
||||
DEF=y
|
||||
if [ $# != 0 -a X$i = X$1 ]
|
||||
then
|
||||
DEF=n
|
||||
shift
|
||||
fi
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Do you want to install $i? (y/n) $E_SFX"
|
||||
echo $E_FLAG "Do you want to install $i? (y/n) [$DEF] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$DEF";;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*|X)
|
||||
Xj*|Xy*)
|
||||
echo "$i will be installed"
|
||||
echo
|
||||
break
|
||||
|
@ -49,10 +65,20 @@ do
|
|||
esac
|
||||
done
|
||||
done
|
||||
OLD_DIS_SUP="$DISABLE_SUP"
|
||||
DISABLE_SUP=
|
||||
set $MACH_LIST
|
||||
while test $# != 0
|
||||
do
|
||||
DEF=y
|
||||
for i in $OLD_DIS_SUP
|
||||
do
|
||||
if [ X$i = X$1 ]
|
||||
then
|
||||
DEF=n
|
||||
break
|
||||
fi
|
||||
done
|
||||
while :
|
||||
do
|
||||
case $1 in
|
||||
|
@ -66,10 +92,13 @@ m68k4, pmds4, sun2, and mantra."
|
|||
m68020) echo "not installing m68020 will disable installation of sun3."
|
||||
;;
|
||||
esac
|
||||
echo $E_FLAG "Do you want to install the $1 support? (y/n) $E_SFX"
|
||||
echo $E_FLAG "Do you want to install the $1 support? (y/n) [$DEF] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$DEF";;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*|X)
|
||||
Xj*|Xy*)
|
||||
echo "The $1 support will be installed"
|
||||
echo
|
||||
case $1 in
|
||||
|
@ -147,7 +176,7 @@ then
|
|||
'') ANS="$DO_FAST" ;;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*|X)
|
||||
Xj*|Xy*)
|
||||
DO_FAST=y
|
||||
echo "The fast compilers will be installed"
|
||||
break
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
# The current setup is for ACK lint. If you want to use the Unix lint,
|
||||
# put '#' signs on the next 4 lines that have ACK in them.
|
||||
|
||||
LINT=/usr/bin/lint # Unix lint
|
||||
LINT=$(UTIL_HOME)/bin/lint # ACK lint
|
||||
LINT=/usr/bin/lint# # Unix lint
|
||||
LINT=$(UTIL_HOME)/bin/lint# # ACK lint
|
||||
|
||||
LINTOPTIONS= # options always passed to lint
|
||||
LINTOPTIONS=# # options always passed to lint
|
||||
|
||||
LINTPREF=llib-l # prefix of unix lint libraries
|
||||
LINTPREF= # ACK lint libraries do not have a prefix
|
||||
LINTPREF=llib-l# # prefix of unix lint libraries
|
||||
LINTPREF=# # ACK lint libraries do not have a prefix
|
||||
|
||||
LINTSUF=ln # suffix of Unix lint libraries
|
||||
LINTSUF=llb # suffix of ACK lint libraries
|
||||
|
||||
MK_LINT_LIB=lint-lib.unix # for Unix lint
|
||||
MK_LINT_LIB=lint-lib.ack # for ACK lint
|
||||
LINTSUF=ln# # suffix of Unix lint libraries
|
||||
LINTSUF=llb# # suffix of ACK lint libraries
|
||||
|
||||
MK_LINT_LIB=lint-lib.unix# # for Unix lint
|
||||
MK_LINT_LIB=lint-lib.ack# # for ACK lint
|
||||
|
|
|
@ -31,12 +31,6 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
cd $SRC_HOME/util/ceg/util
|
||||
for i in make_*
|
||||
do
|
||||
mk_makefile $i > $CONFIG/util/ceg/util/$i
|
||||
done
|
||||
|
||||
cd $CONFIG
|
||||
|
||||
for i in lang/cem/cemcom.ansi lang/cem/cemcom lang/m2/comp
|
||||
|
|
|
@ -13,9 +13,10 @@ create_dir $TARGET_HOME/modules/pkg
|
|||
create_dir $TARGET_HOME/modules/lib
|
||||
create_dir $TARGET_HOME/bin
|
||||
|
||||
( cd $SRC_HOME/modules/h ; tar cf - . ) | ( cd $TARGET_HOME/modules/h ; tar xf - )
|
||||
cp_dir $SRC_HOME/modules/h $TARGET_HOME/modules/h
|
||||
cp local.h em_path.h $TARGET_HOME/config
|
||||
( cd $SRC_HOME/bin ; tar cf - . ) | ( cd $TARGET_HOME/bin ; tar xf - )
|
||||
cp_dir $SRC_HOME/bin $TARGET_HOME/bin
|
||||
cp $CONFIG/bin/cp_dir $TARGET_HOME/bin/cp_dir
|
||||
echo "echo $SYSNAME" > $TARGET_HOME/bin/ack_sys
|
||||
chmod +x $TARGET_HOME/bin/ack_sys
|
||||
|
||||
|
@ -33,10 +34,10 @@ create_dir $TARGET_HOME/include
|
|||
create_dir $TARGET_HOME/doc
|
||||
|
||||
cp $SRC_HOME/etc/ip_spec.t $TARGET_HOME/etc/ip_spec.t
|
||||
( cd $SRC_HOME/lib ; tar cf - . ) | ( cd $TARGET_HOME/lib ; tar xf - )
|
||||
( cd $SRC_HOME/include ; tar cf - . ) | ( cd $TARGET_HOME/include ; tar xf - )
|
||||
( cd $SRC_HOME/h ; tar cf - . ) | ( cd $TARGET_HOME/h ; tar xf - )
|
||||
( cd $SRC_HOME/doc ; tar cf - . ) | ( cd $TARGET_HOME/doc ; tar xf - )
|
||||
cp_dir $SRC_HOME/lib $TARGET_HOME/lib
|
||||
cp_dir $SRC_HOME/h $TARGET_HOME/h
|
||||
cp_dir $SRC_HOME/doc $TARGET_HOME/doc
|
||||
cp_dir $SRC_HOME/include $TARGET_HOME/include
|
||||
|
||||
cd $TARGET_HOME
|
||||
find . -type f -exec chmod +w {} \;
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
# compiler set for target machine
|
||||
|
||||
CC=cc # compiler to be used for compiling ACK
|
||||
CC=cc# # compiler to be used for compiling ACK
|
||||
|
||||
# always passed to $(CC) -c.
|
||||
COPTIONS=-O -D_EM_WSIZE=4 -D_EM_PSIZE=4
|
||||
# always passed to $(CC) -c.
|
||||
|
||||
CC_AND_MKDEP=cc-and-mkdep.all # when $(CC) is neither ACK or SUN,
|
||||
# CC_AND_MKDEP=cc-and-mkdep.ack # when $(CC) is an ACK-derived C compiler,
|
||||
# CC_AND_MKDEP=cc-and-mkdep.sun # when $(CC) is a SUN C compiler
|
||||
CC_AND_MKDEP=cc-and-mkdep.all# # when $(CC) is neither ACK or SUN,
|
||||
# CC_AND_MKDEP=cc-and-mkdep.ack## when $(CC) is an ACK-derived C compiler,
|
||||
# CC_AND_MKDEP=cc-and-mkdep.sun## when $(CC) is a SUN C compiler
|
||||
|
||||
LDOPTIONS= # always passed to $(CC) when linking
|
||||
LDOPTIONS=# # always passed to $(CC) when linking
|
||||
|
||||
SUF=o # suffix of files produced with $(CC) -c
|
||||
SUF=o# # suffix of files produced with $(CC) -c
|
||||
|
||||
AR=ar # archiver for Unix format objects
|
||||
# AR=aal # archiver for ACK .o format objects
|
||||
# AR=arch # archiver for ACK .s format objects
|
||||
AR=ar# # archiver for Unix format objects
|
||||
# AR=aal# # archiver for ACK .o format objects
|
||||
# AR=arch# # archiver for ACK .s format objects
|
||||
|
||||
RANLIB=ranlib # when ranlib required
|
||||
# RANLIB=: # when ranlib not required
|
||||
RANLIB=ranlib# # when ranlib required
|
||||
# RANLIB=:# # when ranlib not required
|
||||
|
||||
LIBSUF=a # suffix of object libraries
|
||||
LIBSUF=a# # suffix of object libraries
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
# has already changed them, but they should be checked to be sure.
|
||||
|
||||
UCC=$(CC)
|
||||
#UCC=cc # compiler to be used
|
||||
#UCC=cc# # compiler to be used
|
||||
|
||||
UCOPTIONS=$(COPTIONS)
|
||||
#UCOPTIONS=-O # always passed to $(UCC) -c.
|
||||
#UCOPTIONS=-O# # always passed to $(UCC) -c.
|
||||
|
||||
ULDOPTIONS=$(LDOPTIONS)
|
||||
#ULDOPTIONS= # always passed to $(UCC) when linking
|
||||
#ULDOPTIONS=# # always passed to $(UCC) when linking
|
||||
|
||||
USUF=$(SUF)
|
||||
#USUF=o # suffix of files produced with $(UCC) -c
|
||||
#USUF=o# # suffix of files produced with $(UCC) -c
|
||||
|
||||
ULIBSUF=$(LIBSUF)
|
||||
#ULIBSUF=a # suffix of object libraries for $(UCC)
|
||||
#ULIBSUF=a# # suffix of object libraries for $(UCC)
|
||||
|
|
Loading…
Reference in a new issue