fixup commit for tag 'llgen-1-0'
This commit is contained in:
18
first/.distr
18
first/.distr
@@ -1,18 +0,0 @@
|
||||
create_dir
|
||||
cp_dir
|
||||
em_path.h.src
|
||||
first
|
||||
get_answer
|
||||
get_makepars
|
||||
get_sys
|
||||
get_sysvax
|
||||
install_tail
|
||||
limit_enquire
|
||||
limit_impl
|
||||
lint_params
|
||||
local.h.src
|
||||
mk_config
|
||||
mk_makefile
|
||||
mk_target
|
||||
target_comp
|
||||
util_comp
|
||||
@@ -1,70 +0,0 @@
|
||||
trap "rm -f x$$.c" 0 1 2 3 15
|
||||
EMHOME=/usr/em
|
||||
CFLAG=0
|
||||
TARGET=a.out
|
||||
while :
|
||||
do
|
||||
case $# in
|
||||
0) break;;
|
||||
esac
|
||||
case $1 in
|
||||
-I*|-D*|-U*)
|
||||
PREP=$PREP" "$1
|
||||
;;
|
||||
-c) CFLAG=1
|
||||
;;
|
||||
-o) shift
|
||||
TARGET=$1
|
||||
;;
|
||||
-F) shift
|
||||
LFLAG="-F $1"
|
||||
;;
|
||||
-*) FLAGS=$FLAGS" "$1
|
||||
;;
|
||||
*) ARG=$ARG" "$1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
for i in $ARG
|
||||
do
|
||||
case $i in
|
||||
*.c)
|
||||
nm=`basename $i .c`
|
||||
if [ -x $EMHOME/lib/cpp ]
|
||||
then
|
||||
cpp=$EMHOME/lib/cpp
|
||||
cppf=-P
|
||||
else
|
||||
cpp=/bin/cc
|
||||
cppf=-E
|
||||
fi
|
||||
if $cpp $cppf $PREP $i > x$$.c && /bin/cc $FLAGS -c x$$.c
|
||||
then
|
||||
mv x$$.o $nm.o
|
||||
LDARG=$LDARG" "$nm.o
|
||||
else
|
||||
rm -f x$$.c
|
||||
exit 1
|
||||
fi
|
||||
rm -f x$$.c
|
||||
;;
|
||||
*.s)
|
||||
if /bin/cc $FLAGS -c $i
|
||||
then
|
||||
LDARG=$LDARG" "`basename $i .s`.o
|
||||
else exit 1
|
||||
fi
|
||||
;;
|
||||
*) LDARG=$LDARG" "$i
|
||||
;;
|
||||
esac
|
||||
done
|
||||
case $CFLAG in
|
||||
1) ;;
|
||||
*) if /bin/cc $FLAGS $LFLAG $LDARG -o $TARGET
|
||||
then :
|
||||
else exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
67
first/ckpath
67
first/ckpath
@@ -1,67 +0,0 @@
|
||||
rm -f ../bin/x_tpath x_tpath
|
||||
echo 'Checking out your $PATH; . and $ACK/bin should be in front ...'
|
||||
echo "echo $$" >../bin/x_tpath
|
||||
rm -f x_tpath
|
||||
chmod +x ../bin/x_tpath
|
||||
case x`(x_tpath) 2>/dev/null`
|
||||
in
|
||||
x$$)
|
||||
STAT=0 ;;
|
||||
x)
|
||||
(cd ../bin ; echo Sorry, `pwd` is not in your shell PATH" ($PATH)")
|
||||
STAT=1 ;;
|
||||
*)
|
||||
echo "Sorry, there is something wrong with your PATH ($PATH)" ;;
|
||||
esac
|
||||
echo "echo t_$$" > X_Y_Z_
|
||||
chmod +x X_Y_Z_
|
||||
case x`X_Y_Z_`
|
||||
in
|
||||
xt_$$)
|
||||
;;
|
||||
x)
|
||||
(cd ../bin ; echo Sorry, . is not in your shell PATH" ($PATH)")
|
||||
STAT=2 ;;
|
||||
*)
|
||||
echo "Sorry, there is something wrong with your PATH ($PATH)" ;;
|
||||
esac
|
||||
rm -f X_Y_Z_
|
||||
case $STAT
|
||||
in
|
||||
2)
|
||||
;;
|
||||
*)
|
||||
hash -r ;;
|
||||
esac
|
||||
echo "echo l_$$" >x_tpath
|
||||
chmod +x x_tpath
|
||||
case x`(x_tpath) 2>/dev/null`
|
||||
in
|
||||
xl_$$)
|
||||
;;
|
||||
x)
|
||||
(cd ../bin ; echo Sorry, . is not in your shell PATH" ($PATH)")
|
||||
STAT=2 ;;
|
||||
x$$)
|
||||
echo Sorry, . is not in your PATH" ($PATH)" or after the ACK bin directory
|
||||
STAT=3 ;;
|
||||
*)
|
||||
echo "Sorry, there is something wrong with your PATH ($PATH)"
|
||||
STAT=4 ;;
|
||||
esac
|
||||
rm -f ../bin/x_tpath x_tpath
|
||||
echo "echo 93" > ../bin/cat
|
||||
chmod +x ../bin/cat
|
||||
hash -r
|
||||
case x`cat < /dev/null 2>/dev/null`
|
||||
in
|
||||
x93)
|
||||
rm -f ../bin/cat
|
||||
;;
|
||||
*)
|
||||
rm -f ../bin/cat
|
||||
(cd ../bin ; echo Sorry, `pwd` comes too late in your PATH" ($PATH)" )
|
||||
STAT=13
|
||||
;;
|
||||
esac
|
||||
exit $STAT
|
||||
16
first/cp_dir
16
first/cp_dir
@@ -1,16 +0,0 @@
|
||||
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$$
|
||||
@@ -1,11 +0,0 @@
|
||||
if ( cd $1 ) 2>/dev/null
|
||||
then
|
||||
:
|
||||
elif mkdir $1 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
echo $0: could not create directory $1 1>&2
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
@@ -1,7 +0,0 @@
|
||||
if (ack_sys ) >/dev/null 2>&1
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
echo "You need to run 'first' first"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
/* Intended as a common directory for ALL temporary files */
|
||||
#define TMP_DIR "/tmp"
|
||||
|
||||
/* Access to the ACK tree and parts thereof */
|
||||
#define EM_DIR "/usr/em" /* The root directory for EM stuff */
|
||||
#define ACK_PATH "lib/descr"
|
||||
207
first/first
207
first/first
@@ -1,207 +0,0 @@
|
||||
#! /bin/sh
|
||||
case $0 in
|
||||
*/first)
|
||||
FDIR=`expr $0 : '\(.*\)/first'`
|
||||
;;
|
||||
first) FDIR=.
|
||||
;;
|
||||
esac
|
||||
|
||||
if echo 'a\c' | grep 'c' >/dev/null ; then
|
||||
: We have BSD-like echo command.
|
||||
E_FLAG='-n'
|
||||
E_SFX=''
|
||||
else
|
||||
: We have SystemV-like echo command.
|
||||
E_FLAG=''
|
||||
E_SFX='\c'
|
||||
fi
|
||||
export E_FLAG E_SFX
|
||||
|
||||
echo check write-ability of /tmp ...
|
||||
if ( >/tmp/aaax.$$ )
|
||||
then
|
||||
rm /tmp/aaax.$$
|
||||
else
|
||||
echo /tmp must exist and be writable.
|
||||
exit 2
|
||||
fi
|
||||
echo "/tmp ok"
|
||||
|
||||
if [ -f macros ]
|
||||
then
|
||||
. macros
|
||||
fi
|
||||
|
||||
: "Now get system name and directories"
|
||||
. $FDIR/get_sys
|
||||
|
||||
: "Take action according to the system used"
|
||||
BM=1
|
||||
OLDACM=$ACM
|
||||
OLDSYS=$SYS
|
||||
case $SYSNAME in
|
||||
vax_bsd4_1a) ACM=vax4 ; SYS=BSD4_1 ; BYTE_ORDER=0123 ; MACH=vax4 ;;
|
||||
vax_bsd4_2) ACM=vax4 ; SYS=BSD4_2 ; BYTE_ORDER=0123 ; MACH=vax4 ;;
|
||||
vax_sysV_2) ACM=vax4 ; SYS=SYS_5 ; BYTE_ORDER=0123 ; MACH=vax4 ;;
|
||||
i386) ACM=i386 ; SYS=SYS_5 ; BYTE_ORDER=0123 ; MACH=i386 ;;
|
||||
sun3) ACM=sun3 ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=m68020 ;;
|
||||
sun2) ACM=sun2 ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=m68k4 ;;
|
||||
m68_unisoft|m68k2) ACM=m68k2 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;;
|
||||
m68_sysV_0|mantra) ACM=mantra ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=m68k4 ;;
|
||||
m68020) ACM=m68020 ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=m68020 ;;
|
||||
sparc) ACM=sparc ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=sparc ;;
|
||||
sparc_solaris) ACM=sparc_solaris ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=sparc_solaris ;;
|
||||
i86) ACM=i86 ; SYS=SYS_5; BYTE_ORDER=0123 ; MACH=i86 ;;
|
||||
xenix3) ACM=xenix3 ; SYS=SYS_5; BYTE_ORDER=0123 ; MACH=i86 ;;
|
||||
minix) ACM=minix ; SYS=V7; BYTE_ORDER=0123 ; MACH=i86 ;;
|
||||
pmds) ACM=pmds ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;;
|
||||
pmds4) ACM=pmds4 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k4 ;;
|
||||
minixST) ACM=minixST ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;;
|
||||
m68k4) ACM=m68k4 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k4 ;;
|
||||
*) ACM=XXX ; SYS=XXX ; BYTE_ORDER=XXX ; MACH=XXX ;;
|
||||
esac
|
||||
|
||||
: do not change the order in MACH_LIST. check limit_enquire first.
|
||||
MACH_LIST="i86 xenix3 minix i386 6500 6800 6805 6809 i80 em22 em24 em44 m68k2 pmds minixST m68k4 pmds4 sun2 mantra m68020 sun3 sparc sparc_solaris ns pdp s2650 vax4 z80 z8000 arm"
|
||||
|
||||
while :
|
||||
do
|
||||
for i in $MACH_LIST
|
||||
do
|
||||
if [ $i = "$ACM" ]
|
||||
then break
|
||||
fi
|
||||
done
|
||||
if [ $i = "$ACM" ]
|
||||
then break
|
||||
fi
|
||||
echo "This installation script has no knowledge about $SYSNAME.
|
||||
You will have to specify the default machine that you want ACK to
|
||||
compile for. Choices:"
|
||||
l=
|
||||
x=
|
||||
for i in $MACH_LIST
|
||||
do
|
||||
l="$l $i"
|
||||
x=x$x
|
||||
case $x in
|
||||
xxxxxxxxxx) echo $l
|
||||
x=
|
||||
l=
|
||||
;;
|
||||
esac
|
||||
done
|
||||
ACM=$OLDACM
|
||||
echo $l
|
||||
echo $E_FLAG "Your choice: [$OLDACM] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$ACM";;
|
||||
esac
|
||||
ACM="$ANS"
|
||||
done
|
||||
while :
|
||||
do
|
||||
case $SYS in
|
||||
V7|BSD4_1|BSD4_2|SYS_5)
|
||||
break
|
||||
;;
|
||||
*)
|
||||
SYS=$OLDSYS
|
||||
echo 'What kind of Unix is the target system running?
|
||||
Choices:
|
||||
V7 for Unix V7, BSD 2.*
|
||||
BSD4_1 for Berkeley 4.1
|
||||
BSD4_2 for Berkeley 4.2, 4.3, SunOs 3, SunOs 4
|
||||
SYS_5 for Xenix, System III, System V, SunOs 5'
|
||||
echo $E_FLAG "Your choice (V7|BSD4_1|BSD4_2|SYS_5): [$OLDSYS] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$SYS";;
|
||||
esac
|
||||
SYS="$ANS"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
rm -f local.h
|
||||
sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ -e /SYSTEM/s/'^#[ ]*define[ ]*[a-zA-Z_][a-zA-Z0-9_]*'/"# define $SYS"/ < $FDIR/local.h.src >local.h
|
||||
case $BYTE_ORDER in
|
||||
XXX) ;;
|
||||
*) echo '/* Optional definition of BYTE_ORDER: */' >> local.h
|
||||
echo "#define BYTE_ORDER 0x$BYTE_ORDER" >> local.h
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Your default machine to compile for is $ACM"
|
||||
|
||||
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,
|
||||
answer no to the next question. Otherwise, answer yes, and you will be
|
||||
prompted for details"
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Do you want to limit the installation in any way? (y/n) [$LIMIT] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$LIMIT";;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy|X)
|
||||
LIMIT=y
|
||||
. $FDIR/limit_enquire
|
||||
break
|
||||
;;
|
||||
Xn*) . $FDIR/get_sysvax
|
||||
LIMIT=n
|
||||
DO_MACHINE_INDEP=y
|
||||
DO_FAST=n
|
||||
DISABLE_LANG=
|
||||
DISABLE_SUP=
|
||||
if [ $TARGET_HOME = $UTIL_HOME ]
|
||||
then
|
||||
case $ACM in
|
||||
sun3|m68020|i386|vax*)
|
||||
DO_FAST=y
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
. $FDIR/get_makepars
|
||||
|
||||
echo "TARGET_HOME=\"$TARGET_HOME\"; export TARGET_HOME" > macros
|
||||
echo "UTIL_HOME=\"$UTIL_HOME\"; export UTIL_HOME" >> macros
|
||||
echo "SRC_HOME=\"$SRC_HOME\"; export SRC_HOME" >> macros
|
||||
echo "SYSNAME=\"$SYSNAME\"; export SYSNAME" >> macros
|
||||
echo "ACM=\"$ACM\"; export ACM" >> macros
|
||||
echo "CURRENT=\"$CURRENT\"; export CURRENT" >> macros
|
||||
echo "SYS=\"$SYS\"; export SYS" >> macros
|
||||
echo "LIMIT=\"$LIMIT\"; export LIMIT" >> macros
|
||||
echo "CONFIG=\"$CONFIG\"; export CONFIG" >> macros
|
||||
echo "DISABLE_LANG=\"$DISABLE_LANG\"; export DISABLE_LANG" >> macros
|
||||
echo "DISABLE_SUP=\"$DISABLE_SUP\"; export DISABLE_SUP" >> macros
|
||||
echo "DO_MACHINE_INDEP=\"$DO_MACHINE_INDEP\"; export DO_MACHINE_INDEP" >> macros
|
||||
echo "MACH_LIST=\"$MACH_LIST\"; export MACH_LIST" >> macros
|
||||
echo "SYSVAX=\"$SYSVAX\"; export SYSVAX" >> macros
|
||||
echo "MACH=\"$MACH\"; export MACH" >> macros
|
||||
echo "WS=\"$WS\"; export WS" >> macros
|
||||
echo "PS=\"$PS\"; export PS" >> macros
|
||||
echo "DO_FAST=\"$DO_FAST\"; export DO_FAST" >> macros
|
||||
|
||||
cat macros $FDIR/install_tail > INSTALL
|
||||
chmod +x INSTALL
|
||||
|
||||
echo "
|
||||
A shell-script called 'INSTALL' has been created. Running it
|
||||
installs ACK. Note that this may take a (very) long time, so run it
|
||||
in the background, with its output redirected, f.i.:
|
||||
sh INSTALL > INSTALL.out 2>&1 &
|
||||
"
|
||||
exit 0
|
||||
@@ -1,75 +0,0 @@
|
||||
FL=succes
|
||||
TRIES=
|
||||
case X$# in
|
||||
X0)
|
||||
if (.Xlex) > /dev/null 2>&1
|
||||
then
|
||||
TRY=`.Xlex`
|
||||
else TRY=-lln
|
||||
fi
|
||||
echo "trying to find your lex library ..."
|
||||
cat > x.l <<'EOF'
|
||||
%%
|
||||
[A-Z] putchar(yytext[0]+'a'-'A');
|
||||
EOF
|
||||
if lex x.l > /dev/null 2>&1 && cc -c lex.yy.c > /dev/null 2>&1
|
||||
then :
|
||||
else echo "Sorry, your lex does not seem to work"
|
||||
exit 2
|
||||
fi
|
||||
cat > trylib <<'EOF'
|
||||
if cc lex.yy.o $1 > /dev/null 2>&1
|
||||
then
|
||||
rm -f lex.yy.* a.out
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
EOF
|
||||
if sh trylib $TRY
|
||||
then
|
||||
LEX=$TRY
|
||||
else
|
||||
exec $0 -ll $TRY
|
||||
fi
|
||||
;;
|
||||
*) if sh trylib $1
|
||||
then
|
||||
LEX=$1
|
||||
else
|
||||
TRIES="$2 and $1"
|
||||
FL=fail
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case X$FL in
|
||||
Xfail) echo 'What option do I have to give to cc to get the LEX library?'
|
||||
echo "I tried " $TRIES "but these don't seem to work."
|
||||
echo -n 'LEX library option: '
|
||||
if read ANSWER
|
||||
then :
|
||||
else echo "Sorry, got EOF while reading your answer"
|
||||
exit 9
|
||||
fi
|
||||
exec $0 $ANSWER "$TRIES"
|
||||
;;
|
||||
Xsucces)
|
||||
for i in ../util/opt ../util/cgg ../util/ncgg ../lang/occam/comp ../modules/src/em_opt ../util/ceg/as_parser
|
||||
do
|
||||
( cd $i
|
||||
cp Makefile makefile
|
||||
ed - makefile << EOF
|
||||
/^LEXLIB/c
|
||||
LEXLIB = $LEX
|
||||
.
|
||||
w
|
||||
q
|
||||
EOF
|
||||
)
|
||||
done
|
||||
;;
|
||||
esac
|
||||
rm -f x.l trylib lex.yy.*
|
||||
echo echo "$LEX" > .Xlex
|
||||
chmod +x .Xlex
|
||||
echo "apparently, \"cc ... $LEX\" works"
|
||||
@@ -1,5 +0,0 @@
|
||||
if read ANS
|
||||
then echo
|
||||
else echo "Sorry, got EOF when reading your answer"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,104 +0,0 @@
|
||||
know_target=0
|
||||
case $SYSNAME in
|
||||
vax*|i386|sun*|sparc*|m68_sysV_0|m68020|mantra|pmds4|m68k4)
|
||||
WS=4 ; PS=4
|
||||
know_target=1
|
||||
;;
|
||||
m68_unisoft|m68k2|minixST|pmds)
|
||||
WS=2 ; PS=4
|
||||
know_target=1
|
||||
;;
|
||||
i86|minix|xenix3)
|
||||
WS=2 ; PS=2
|
||||
know_target=1
|
||||
;;
|
||||
*) trap "rm -f ws.c ws.o a.out t$$" 0 1 2 3 15
|
||||
cat > ws.c <<'EOF'
|
||||
#include <stdio.h>
|
||||
main()
|
||||
{
|
||||
printf("WS=%d ; PS=%d\n", sizeof(int), sizeof(char *));
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if [ $TARGET_HOME = $UTIL_HOME ] && cc ws.c 2>/dev/null
|
||||
then
|
||||
: We can find out ourselves what the word-size and
|
||||
: the pointer-size of the target machine is.
|
||||
cc ws.c 2>/dev/null
|
||||
./a.out > t$$
|
||||
. t$$
|
||||
rm -f t$$ a.out ws.[co]
|
||||
else
|
||||
: we will have to ask installer.
|
||||
echo $E_FLAG "Please give the word-size of the target-machine (sizeof(int)) in bytes: [$WS] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$WS";;
|
||||
esac
|
||||
WS="$ANS"
|
||||
echo $E_FLAG "Please give the pointer-size of the target-machine (sizeof(char *)) in bytes: [$PS] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$PS";;
|
||||
esac
|
||||
PS="$ANS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "# Paths:
|
||||
SRC_HOME = $SRC_HOME
|
||||
TARGET_HOME = $TARGET_HOME
|
||||
UTIL_HOME = $UTIL_HOME
|
||||
|
||||
# Machine independent part created?
|
||||
DO_MACHINE_INDEP = $DO_MACHINE_INDEP
|
||||
|
||||
# Target machine, only needed for fast compilers
|
||||
MACH = $MACH
|
||||
" > make_macros
|
||||
|
||||
if [ $TARGET_HOME = $UTIL_HOME ]
|
||||
then
|
||||
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 -D__${MACH}__/" < $FDIR/target_comp >> make_macros
|
||||
else
|
||||
sed -e "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS -D__${MACH}__/" -e "s/^# RANLIB=:/RANLIB=:/" < $FDIR/target_comp >> make_macros
|
||||
fi
|
||||
case $ACM in
|
||||
sun3|sparc)
|
||||
ed -s make_macros <<'EOF'
|
||||
/cc-and-mkdep.sun/s/^..//
|
||||
w
|
||||
q
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
cat $FDIR/util_comp >> make_macros
|
||||
else
|
||||
case $know_target in
|
||||
1) sed -e "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS -D__${MACH}__/" -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
|
||||
;;
|
||||
*) 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 -D__${MACH}__/" < $FDIR/target_comp >> make_macros
|
||||
else
|
||||
sed -e "s/^COPTIONS.*\$/COPTIONS=-O -D_EM_WSIZE=$WS -D_EM_PSIZE=$PS -D__${MACH}__/" -e "s/^# RANLIB=:/RANLIB=:/" < $FDIR/target_comp >> make_macros
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
sed "s/^#U/U/" < $FDIR/util_comp >> make_macros
|
||||
fi
|
||||
|
||||
cat $FDIR/lint_params >> make_macros
|
||||
|
||||
echo "A file called 'make_macros' has been created. This file defines some
|
||||
'make' variables that parameterize all Makefiles in ACK. You may want
|
||||
to check it before attempting to actually install ACK."
|
||||
case $know_target in
|
||||
0) echo "In fact, this installation script does not know much about
|
||||
your target machine, so expect some things to be wrong"
|
||||
;;
|
||||
esac
|
||||
155
first/get_sys
155
first/get_sys
@@ -1,155 +0,0 @@
|
||||
rm -f em_path.h
|
||||
echo "You will now be asked for the root directory of the ACK sources.
|
||||
This directory will not be changed by the installation process.
|
||||
"
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Please give the root of the ACK source tree,
|
||||
an absolute path: [$SRC_HOME] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$SRC_HOME" ;;
|
||||
esac
|
||||
SRC_HOME="$ANS"
|
||||
case $SRC_HOME in
|
||||
/*) break;
|
||||
;;
|
||||
*) echo "$SRC_HOME is not an absolute path; try again"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo "You will now be asked for a configuration directory. This is
|
||||
the directory in which the compilations will take place. The tree that
|
||||
resides in it will have the same structure as the ACK source tree, but
|
||||
the directories will usually only contain Makefiles and .o files.
|
||||
"
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Please give the root of the configuration tree,
|
||||
an absolute path: [$CONFIG] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$CONFIG";;
|
||||
esac
|
||||
CONFIG="$ANS"
|
||||
case $CONFIG in
|
||||
/*) break;
|
||||
;;
|
||||
*) echo "$CONFIG is not an absolute path; try again"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo "You will now be asked for the root directory of the ACK binaries. After
|
||||
installation, this directory will have subdirectories bin, lib, lib.bin,
|
||||
man, h, config, include, modules, doc.
|
||||
Four of these directories will contain stuff that depends on the machine
|
||||
for which the ACK binaries are made: bin, modules, config, and lib.bin. The
|
||||
other sub-directories (lib, man, h, include and doc) will contain
|
||||
machine-independent stuff.
|
||||
This information may be useful if you want to use ACK on different platforms
|
||||
and you have a shared file system. See the installation manual.
|
||||
"
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Please give the root of the ACK binaries,
|
||||
an absolute path: [$TARGET_HOME] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$TARGET_HOME";;
|
||||
esac
|
||||
TARGET_HOME="$ANS"
|
||||
case $TARGET_HOME in
|
||||
/*) break;
|
||||
;;
|
||||
*) echo "$TARGET_HOME is not an absolute path; try again"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
sed -e "/^#define[ ]*EM_DIR/s@\".*\"@\"$TARGET_HOME\"@" <$FDIR/em_path.h.src >em_path.h
|
||||
|
||||
echo "You will now be asked for the type of the system that you want
|
||||
ACK binaries produced for. This is not neccessarily the system you
|
||||
run this program on. In this case, if you have not done so already,
|
||||
you will have to install ACK on the current machine first.
|
||||
"
|
||||
echo "Give me the type of the system, the current choice is:
|
||||
vax_bsd4_1a VAX11 with BSD4.1a
|
||||
vax_bsd4_2 VAX11 with BSD4.2
|
||||
vax_sysV_2 VAX11 with System V.2
|
||||
i386 Intel 80386 system running Xenix System V
|
||||
sun3 Sun 3 M68020 workstation
|
||||
sun2 Sun 2 M68000 workstation
|
||||
m68_sysV_0 Motorola 68000 with Uniplus System V.0 Unix
|
||||
m68020 Motorola M68020 VME131 running Unix System V/68 R2V2.1
|
||||
sparc SUN SPARC workstation running SunOs 4
|
||||
sparc_solaris SUN SPARC workstation running solaris 2
|
||||
ANY Neither of the above
|
||||
"
|
||||
echo $E_FLAG "system type: [$SYSNAME] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$SYSNAME";;
|
||||
esac
|
||||
SYSNAME="$ANS"
|
||||
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Is this the system you are running on? (y/n) [$CURRENT] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$CURRENT";;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*|X) UTIL_HOME=$TARGET_HOME
|
||||
CURRENT=y
|
||||
break
|
||||
;;
|
||||
Xn*) CURRENT=n
|
||||
echo "You will now be asked for the root directory of ACK on the current machine.
|
||||
This tree will not be changed by the installation process.
|
||||
"
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Please give the root of a runnable ACK tree,
|
||||
an absolute path: [$UTIL_HOME] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$UTIL_HOME" ;;
|
||||
esac
|
||||
UTIL_HOME="$ANS"
|
||||
case $UTIL_HOME in
|
||||
/*) break;
|
||||
;;
|
||||
*) echo "$UTIL_HOME is not an absolute path; try again"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
while :
|
||||
do
|
||||
echo "The system to install ACK for is $SYSNAME,
|
||||
the root of the ACK source tree is $SRC_HOME,
|
||||
the root of the configuration tree is $CONFIG,
|
||||
the root of the ACK binary tree to be created is $TARGET_HOME,
|
||||
and the root of a runnable ACK binary tree is $UTIL_HOME.
|
||||
If the machine to compile ACK for is the current machine, the last two names
|
||||
may be identical."
|
||||
echo $E_FLAG "Are you satisfied with all this? (y/n) $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case X$ANS in
|
||||
Xj*|Xy*|X) break
|
||||
;;
|
||||
Xn*) echo Ok, I will give you another chance....
|
||||
. $0
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -1,21 +0,0 @@
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Which system-call library do you want to install for the VAX?
|
||||
You can choose between
|
||||
libbsd4_1a for Berkeley Unix 4.1
|
||||
libbsd4_2 for Berkeley Unix 4.2 or newer, or Ultrix
|
||||
libsysV_2 for Unix System V
|
||||
Your choice: [$SYSVAX] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$SYSVAX";;
|
||||
esac
|
||||
SYSVAX="$ANS"
|
||||
case $SYSVAX in
|
||||
libbsd4_1a|libbsd4_2|libsysV_2)
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($SYSVAX). Try again"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -1,84 +0,0 @@
|
||||
set -e
|
||||
|
||||
PATH=::$CONFIG/bin:$UTIL_HOME/bin:/usr/ccs/bin:/usr/ucb:$PATH
|
||||
export PATH
|
||||
|
||||
$SRC_HOME/first/create_dir $CONFIG
|
||||
$SRC_HOME/first/create_dir $CONFIG/bin
|
||||
|
||||
echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH" > $CONFIG/bin/TakeAction
|
||||
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
|
||||
|
||||
$SRC_HOME/first/mk_target
|
||||
|
||||
$SRC_HOME/first/limit_impl
|
||||
|
||||
case $SYSNAME in
|
||||
i386)
|
||||
ed -s $TARGET_HOME/lib/descr/fe << 'ABC'
|
||||
1,$s/-D{NAME}/-D{NAME} -DNO_PROTOTYPE/
|
||||
w
|
||||
q
|
||||
ABC
|
||||
;;
|
||||
esac
|
||||
|
||||
: find varargs include file
|
||||
: if not present use our own
|
||||
|
||||
if test -f /usr/include/varargs.h
|
||||
then
|
||||
:
|
||||
else
|
||||
cp $SRC_HOME/include/_tail_cc/varargs.h $TARGET_HOME/modules/h
|
||||
fi
|
||||
|
||||
case X$SYSVAX in
|
||||
Xvax_sysV_2)
|
||||
ed -s $TARGET_HOME/lib/vax4/descr << 'ABC'
|
||||
/CPP_F/s/$/ -D__USG/
|
||||
w
|
||||
q
|
||||
ABC
|
||||
ed -s $CONFIG/mach/vax4/Action << 'ABC'
|
||||
/libbsd4_2/s/libbsd4_2/libsysV_2/
|
||||
w
|
||||
q
|
||||
ABC
|
||||
( cd $CONFIG/mach/vax4
|
||||
for i in libcc libcc.ansi
|
||||
do
|
||||
ed -s $i/Makefile << 'ABC'
|
||||
/BFS/s/BFS/UFS/
|
||||
w
|
||||
q
|
||||
ABC
|
||||
done
|
||||
)
|
||||
;;
|
||||
Xvax_bsd4_2)
|
||||
ed -s $TARGET_HOME/lib/vax4/descr << 'ABC'
|
||||
/CPP_F/s/$/ -D__BSD4_2/
|
||||
w
|
||||
q
|
||||
ABC
|
||||
;;
|
||||
Xvax_bsd4_1a)
|
||||
ed -s $CONFIG/mach/vax4/Action << 'ABC'
|
||||
/libbsd4_2/s/libbsd4_2/libbsd4_1a/
|
||||
w
|
||||
q
|
||||
ABC
|
||||
;;
|
||||
esac
|
||||
|
||||
: and finally installing ...
|
||||
cd $CONFIG
|
||||
set +e
|
||||
exec TakeAction
|
||||
@@ -1,207 +0,0 @@
|
||||
while :
|
||||
do
|
||||
echo "The libraries will end up in the machine-independent part of the
|
||||
ACK binary tree. You may already have them from a previous ACK installation
|
||||
on a different machine, in particular if you have an NFS file system.
|
||||
Therefore, it may not be neccessary to install them again. As this part
|
||||
of the ACK installation takes the most time, you are given the opportunity
|
||||
to disable installation of the machine-independent part"
|
||||
echo $E_FLAG \
|
||||
"Do you want to install the machine-independent part? (y/n) [$DO_MACHINE_INDEP] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$DO_MACHINE_INDEP" ;;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*|X) DO_MACHINE_INDEP=y
|
||||
echo "machine-independent part will be installed"
|
||||
echo
|
||||
break
|
||||
;;
|
||||
Xn*) DO_MACHINE_INDEP=n
|
||||
echo "machine-independent part will not be installed"
|
||||
echo
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
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) [$DEF] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$DEF";;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*)
|
||||
echo "$i will be installed"
|
||||
echo
|
||||
break
|
||||
;;
|
||||
Xn*) DISABLE_LANG=$DISABLE_LANG" $i"
|
||||
echo "$i will not be installed"
|
||||
echo
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
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
|
||||
i86) echo "not installing i86 will disable installation of xenix3 and minix."
|
||||
;;
|
||||
m68k2) echo "not installing m68k2 will disable installation of pmds, minixST,
|
||||
m68k4, pmds4, sun2, and mantra."
|
||||
;;
|
||||
m68k4) echo "not installing m68k4 will disable installation of 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) [$DEF] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$DEF";;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*)
|
||||
echo "The $1 support will be installed"
|
||||
echo
|
||||
case $1 in
|
||||
vax4) case $SYSNAME in
|
||||
vax_bsd4_1a) SYSVAX=libbsd4_1a
|
||||
;;
|
||||
vax_bsd4_2) SYSVAX=libbsd4_2
|
||||
;;
|
||||
vax_sysV_2) SYSVAX=libsysV_2
|
||||
;;
|
||||
*) if [ $DO_MACHINE_INDEP = y ]
|
||||
then
|
||||
. $FDIR/get_sysvax
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sparc) shift
|
||||
;;
|
||||
esac
|
||||
break
|
||||
;;
|
||||
Xn*) DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
echo "The $1 support will not be installed"
|
||||
echo
|
||||
case $1 in
|
||||
i86)
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
;;
|
||||
m68k2)
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
;;
|
||||
m68k4)
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
;;
|
||||
sparc)
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
;;
|
||||
m68020)
|
||||
shift
|
||||
DISABLE_SUP=$DISABLE_SUP" $1"
|
||||
;;
|
||||
esac
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $TARGET_HOME = $UTIL_HOME ]
|
||||
then
|
||||
case $ACM in
|
||||
sun3|m68020|i386|vax*)
|
||||
while :
|
||||
do
|
||||
echo $E_FLAG "Do you want to install the fast compilers? (y/n) [$DO_FAST] $E_SFX"
|
||||
. $FDIR/get_answer
|
||||
case $ANS in
|
||||
'') ANS="$DO_FAST" ;;
|
||||
esac
|
||||
case X$ANS in
|
||||
Xj*|Xy*)
|
||||
DO_FAST=y
|
||||
echo "The fast compilers will be installed"
|
||||
break
|
||||
;;
|
||||
Xn*)
|
||||
DO_FAST=n
|
||||
echo "The fast compilers will not be installed"
|
||||
break
|
||||
;;
|
||||
*) echo "I do not understand your answer ($ANS). Try again."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
*)
|
||||
DO_FAST=n
|
||||
;;
|
||||
esac
|
||||
else
|
||||
DO_FAST=n
|
||||
fi
|
||||
206
first/limit_impl
206
first/limit_impl
@@ -1,206 +0,0 @@
|
||||
for i in $DISABLE_LANG
|
||||
do
|
||||
ed -s $CONFIG/Action <<EOF
|
||||
/^name "$i/;/^end/s/^/!/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
case $i in
|
||||
Modula-2)
|
||||
ed -s $CONFIG/Action <<EOF
|
||||
/^name "$i definition/;/^end/s/^/!/
|
||||
/^name "$i makefile/;/^end/s/^/!/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
;;
|
||||
ANSI-C) : install compiler anyway
|
||||
ed -s $CONFIG/Action <<EOF
|
||||
/^!name "$i frontend/;/^!end/s/^!//
|
||||
w
|
||||
q
|
||||
EOF
|
||||
;;
|
||||
C) : install compiler anyway
|
||||
ed -s $CONFIG/Action <<EOF
|
||||
/^!name "$i frontend/;/^!end/s/^!//
|
||||
w
|
||||
q
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for i in Modula-2 Pascal Basic Occam ANSI-C C Fortran
|
||||
do
|
||||
if [ $DO_MACHINE_INDEP = n ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
for j in $DISABLE_LANG
|
||||
do
|
||||
case $i in
|
||||
$j) i=X
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
case $i in
|
||||
X) continue
|
||||
;;
|
||||
Modula-2)
|
||||
lib=libm2
|
||||
;;
|
||||
Pascal)
|
||||
lib=libpc
|
||||
;;
|
||||
Basic)
|
||||
lib=libbc
|
||||
;;
|
||||
Occam)
|
||||
lib=liboc
|
||||
;;
|
||||
ANSI-C)
|
||||
lib=libcc.ansi
|
||||
;;
|
||||
C)
|
||||
lib=libcc
|
||||
;;
|
||||
Fortran)
|
||||
lib=libf77
|
||||
;;
|
||||
esac
|
||||
( cd $CONFIG/mach
|
||||
for j in $MACH_LIST
|
||||
do
|
||||
case $j in
|
||||
6800|6805|6809|s2650) continue
|
||||
;;
|
||||
esac
|
||||
: do not install fortran for 2-byte integer machines
|
||||
case $i in
|
||||
Fortran) case $j in
|
||||
em2*|i8*|m68k2|minix*|pdp|pmds|xenix3|z80*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
case $j in
|
||||
sparc*)
|
||||
( cd $j
|
||||
cat >> Action <<EOF
|
||||
name "$j $i libraries"
|
||||
system "$j"
|
||||
dir $lib
|
||||
end
|
||||
EOF
|
||||
)
|
||||
;;
|
||||
*)
|
||||
( cd $j
|
||||
cat >> Action <<EOF
|
||||
name "$j $i libraries"
|
||||
dir $lib
|
||||
end
|
||||
EOF
|
||||
)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
)
|
||||
done
|
||||
DISABLE_INT=0
|
||||
for i in $DISABLE_SUP
|
||||
do
|
||||
ed -s $CONFIG/Action <<EOF
|
||||
/^dir .*$i\$/;?^name?;/^end/s/^/!/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
case $i in
|
||||
m68k2)
|
||||
DISABLE_INT=1
|
||||
;;
|
||||
m68k4)
|
||||
case $SYSNAME in
|
||||
m68_sysV_0|sun2)
|
||||
DISABLE_INT=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mantra)
|
||||
if test $SYSNAME = m68_sysV_0
|
||||
then
|
||||
DISABLE_INT=1
|
||||
fi
|
||||
;;
|
||||
sun2)
|
||||
if test $SYSNAME = sun2
|
||||
then
|
||||
DISABLE_INT=1
|
||||
fi
|
||||
;;
|
||||
sun3)
|
||||
if test $SYSNAME = sun3
|
||||
then
|
||||
DISABLE_INT=1
|
||||
fi
|
||||
;;
|
||||
pmds4)
|
||||
case $SYSNAME in
|
||||
pmds*)
|
||||
DISABLE_INT=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
m68020)
|
||||
case $SYSNAME in
|
||||
m68020|sun3)
|
||||
DISABLE_INT=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
case $SYSNAME in
|
||||
m68*|sun2|sun3|pmds*)
|
||||
;;
|
||||
*) DISABLE_INT=1
|
||||
;;
|
||||
esac
|
||||
if test $DISABLE_INT = 1
|
||||
then
|
||||
ed -s $CONFIG/Action <<EOF
|
||||
/68000 interpreters/;/^end/s/^/!/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ $DO_MACHINE_INDEP = n ]
|
||||
then
|
||||
for i in $CONFIG/mach/*/Action
|
||||
do
|
||||
for j in libem libend libfp libdb libsys libmon libbsd4_2 libbsd4_1a libsysV_2 libce
|
||||
do
|
||||
if fgrep -s $j $i
|
||||
then
|
||||
ed -s $i <<EOF
|
||||
/$j/;?^name?,/^end/s/^/!/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
if [ $DO_FAST = n ]
|
||||
then
|
||||
ed -s $CONFIG/Action <<'EOF'
|
||||
/^name "Peephole optimizer lib/;/^end/s/^/!/
|
||||
/^name "Fast/;$s/^/!/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
fi
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
# There are two choices for lint here: ACK lint and Unix lint.
|
||||
# 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
|
||||
|
||||
LINTOPTIONS=# # options always passed to lint
|
||||
|
||||
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
|
||||
@@ -1,19 +0,0 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
/* collection of options, selected by including or excluding 'defines' */
|
||||
|
||||
/* Version number of the EM object code */
|
||||
# define VERSION 3 /* 16 bits number */
|
||||
|
||||
/* The default machine used by ack, acc, apc */
|
||||
# define ACKM "sun3"
|
||||
|
||||
/* size of local machine, either 0 (for 16 bit address space), or 1 */
|
||||
# define BIGMACHINE 1
|
||||
|
||||
/* operating system, SYS_5, V7, BSD4_1 or BSD4_2; Do NOT delete the comment
|
||||
in the next line! */
|
||||
# define BSD4_2 1 /* SYSTEM */
|
||||
130
first/mk_config
130
first/mk_config
@@ -1,130 +0,0 @@
|
||||
set -e
|
||||
|
||||
create_dir $CONFIG
|
||||
|
||||
create_dir $CONFIG/bin
|
||||
echo "echo $SYSNAME" > $CONFIG/bin/ack_sys
|
||||
chmod +x $CONFIG/bin/ack_sys
|
||||
|
||||
cd $SRC_HOME
|
||||
find . -type d -perm -555 -print > $CONFIG/dir_list
|
||||
|
||||
cd $CONFIG
|
||||
for i in mach/*/libsys
|
||||
do
|
||||
rm -rf $i
|
||||
done
|
||||
|
||||
for i in `cat dir_list`
|
||||
do
|
||||
create_dir $i
|
||||
rm -f $i/No*
|
||||
if [ -f $i/Makefile ]
|
||||
then
|
||||
( cd $i ; if make clean ; then exit 0 ; else exit 0 ; fi ) > /dev/null 2>&1
|
||||
fi
|
||||
if [ -f $SRC_HOME/$i/proto.make ]
|
||||
then mk_makefile $SRC_HOME/$i/proto.make > $i/Makefile
|
||||
fi
|
||||
if [ -f $SRC_HOME/$i/Action ]
|
||||
then
|
||||
cd $SRC_HOME/$i
|
||||
cp Action* $CONFIG/$i
|
||||
chmod +w $CONFIG/$i/Action*
|
||||
cd $CONFIG
|
||||
fi
|
||||
done
|
||||
|
||||
cd $CONFIG
|
||||
|
||||
for i in lang/cem/cemcom.ansi lang/cem/cemcom lang/m2/comp
|
||||
do
|
||||
cp $SRC_HOME/$i/BigPars $CONFIG/$i/Parameters
|
||||
chmod +w $CONFIG/$i/Parameters
|
||||
done
|
||||
for i in lang/pc/comp lang/cem/cpp.ansi
|
||||
do
|
||||
cp $SRC_HOME/$i/Parameters $CONFIG/$i/Parameters
|
||||
chmod +w $CONFIG/$i/Parameters
|
||||
done
|
||||
|
||||
cd $CONFIG/mach
|
||||
for i in *
|
||||
do
|
||||
if [ -d $i ]
|
||||
then
|
||||
if [ -d $i/as ]
|
||||
then
|
||||
cd $i/as
|
||||
mk_makefile $SRC_HOME/mach/proto/as/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
|
||||
cd ../..
|
||||
fi
|
||||
if [ -d $i/top ]
|
||||
then
|
||||
cd $i/top
|
||||
mk_makefile $SRC_HOME/mach/proto/top/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
|
||||
cd ../..
|
||||
fi
|
||||
if [ -d $i/cg ]
|
||||
then
|
||||
cd $i/cg
|
||||
mk_makefile $SRC_HOME/mach/proto/cg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
|
||||
cd ../..
|
||||
fi
|
||||
if [ -d $i/ncg ]
|
||||
then
|
||||
cd $i/ncg
|
||||
mk_makefile $SRC_HOME/mach/proto/ncg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
|
||||
if [ -f $SRC_HOME/mach/$i/ncg/table_dir ]
|
||||
then
|
||||
ed -s Makefile <<EOF
|
||||
/^#TABLE_DEFINE/+1r $SRC_HOME/mach/$i/ncg/table_dir
|
||||
w
|
||||
q
|
||||
EOF
|
||||
fi
|
||||
cd ../..
|
||||
fi
|
||||
if [ -f $SRC_HOME/mach/$i/mach_params ]
|
||||
then :
|
||||
else continue
|
||||
fi
|
||||
for j in libem libend libmon libfp libsys libdb
|
||||
do
|
||||
if [ -d $i/$j ]
|
||||
then
|
||||
cd $i/$j
|
||||
mk_makefile $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
|
||||
cd ../..
|
||||
fi
|
||||
done
|
||||
for j in libbsd4_1a libbsd4_2 libsysV_2
|
||||
do
|
||||
if [ -d $i/$j ]
|
||||
then
|
||||
cd $i/$j
|
||||
mk_makefile $SRC_HOME/mach/proto/libg/proto.libsys | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" -e "s/libsys/$j/g" > Makefile
|
||||
cd ../..
|
||||
fi
|
||||
done
|
||||
for j in libcc libcc.ansi libm2 libpc libbc liboc libf77
|
||||
do
|
||||
create_dir $i/$j
|
||||
rm -f $i/$j/No*
|
||||
cd $i/$j
|
||||
mk_makefile $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
|
||||
cd ../..
|
||||
done
|
||||
if [ $i = vax4 ]
|
||||
then :
|
||||
elif [ -d $i/libsys ]
|
||||
then :
|
||||
else
|
||||
create_dir $i/libsys
|
||||
rm -f $i/libsys/No*
|
||||
cd $i/libsys
|
||||
mk_makefile $SRC_HOME/mach/proto/libg/proto.sysmon | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
|
||||
cd ../..
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -1,34 +0,0 @@
|
||||
: '$Id$'
|
||||
|
||||
: This shell script inserts make macros after a line
|
||||
: starting with #PARAMS in "make_proto", and produces the result on
|
||||
: standard output.
|
||||
|
||||
trap "rm -f /tmp/mk_mak$$" 0 1 2 3 15
|
||||
case $# in
|
||||
1) ;;
|
||||
*) echo "Usage: $0 <make_proto>" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
cp $1 /tmp/mk_mak$$
|
||||
|
||||
ed -s /tmp/mk_mak$$ << 'EOF'
|
||||
/^#PARAMS/c
|
||||
#PARAMS do not remove this line!
|
||||
.
|
||||
w
|
||||
q
|
||||
EOF
|
||||
case `ack_sys` in
|
||||
sparc_solaris)
|
||||
ed -s /tmp/mk_mak$$ << 'EOF'
|
||||
g/^EXTRALIB/s/=/= -lelf/
|
||||
w
|
||||
q
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
cat /tmp/mk_mak$$
|
||||
exit 0
|
||||
@@ -1,39 +0,0 @@
|
||||
set -e
|
||||
|
||||
: machine-dependant stuff
|
||||
|
||||
create_dir $TARGET_HOME
|
||||
create_dir $TARGET_HOME/config
|
||||
create_dir $TARGET_HOME/lib.bin
|
||||
create_dir $TARGET_HOME/modules
|
||||
create_dir $TARGET_HOME/modules/h
|
||||
create_dir $TARGET_HOME/bin
|
||||
|
||||
cp local.h em_path.h $TARGET_HOME/config
|
||||
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
|
||||
|
||||
: machine-independant stuff
|
||||
|
||||
if [ $DO_MACHINE_INDEP = n ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
create_dir $TARGET_HOME/lib
|
||||
create_dir $TARGET_HOME/etc
|
||||
create_dir $TARGET_HOME/h
|
||||
create_dir $TARGET_HOME/include
|
||||
create_dir $TARGET_HOME/doc
|
||||
|
||||
cp $SRC_HOME/etc/ip_spec.t $TARGET_HOME/etc/ip_spec.t
|
||||
cp_dir $SRC_HOME/lib $TARGET_HOME/lib
|
||||
cp_dir $SRC_HOME/h $TARGET_HOME/h
|
||||
cp_dir $SRC_HOME/include $TARGET_HOME/include
|
||||
|
||||
cd $TARGET_HOME
|
||||
find . -type f -exec chmod +w {} \;
|
||||
|
||||
exit 0
|
||||
@@ -1,21 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int nflag = 0;
|
||||
|
||||
if(argc > 1 && ! strncmp(argv[1], "-n", 2)) {
|
||||
nflag++;
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
while (--argc > 0) {
|
||||
fputs(argv[1], stdout);
|
||||
argv++;
|
||||
if (argc > 1) putchar(' ');
|
||||
}
|
||||
if (!nflag) putchar('\n');
|
||||
exit(0);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
# compiler set for target machine
|
||||
|
||||
CC=cc# # compiler to be used for compiling ACK
|
||||
|
||||
# always passed to $(CC) -c.
|
||||
COPTIONS=-O -D_EM_WSIZE=4 -D_EM_PSIZE=4
|
||||
|
||||
# passed to $(CC) -c when compiling modules.
|
||||
LIBOPTIONS=#
|
||||
# LIBOPTIONS=-LIB -L # when $(CC) is ACK
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
RANLIB=ranlib# # when ranlib required
|
||||
# RANLIB=:# # when ranlib not required
|
||||
|
||||
LIBSUF=a# # suffix of object libraries
|
||||
@@ -1,23 +0,0 @@
|
||||
|
||||
# compiler set for producing runnable binaries (possibly using $(UTIL_HOME)).
|
||||
# This must describe the compiler with which $(UTIL_HOME) has been compiled.
|
||||
# If $(TARGET_HOME) is identical to $(UTIL_HOME), which usually will be
|
||||
# the case, this part does not have to be changed. Otherwise (when you are
|
||||
# cross-compiling ACK), you will have to change this part. Probable
|
||||
# replacements are given in comments. Maybe the installation script
|
||||
# has already changed them, but they should be checked to be sure.
|
||||
|
||||
UCC=$(CC)
|
||||
#UCC=cc# # compiler to be used
|
||||
|
||||
UCOPTIONS=$(COPTIONS)
|
||||
#UCOPTIONS=-O# # always passed to $(UCC) -c.
|
||||
|
||||
ULDOPTIONS=$(LDOPTIONS)
|
||||
#ULDOPTIONS=# # always passed to $(UCC) when linking
|
||||
|
||||
USUF=$(SUF)
|
||||
#USUF=o# # suffix of files produced with $(UCC) -c
|
||||
|
||||
ULIBSUF=$(LIBSUF)
|
||||
#ULIBSUF=a# # suffix of object libraries for $(UCC)
|
||||
Reference in New Issue
Block a user