--- /dev/null
++#!/bin/sh
+: '$Id$'
+
+: Compile and make dependencies. First argument is the file on which the
+: dependencies must be produced. This version is for ACK.
+n=$1
+shift
+exec $CC -Rcem-A$n -Rcem-m $*
--- /dev/null
- $UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n
++#!/bin/sh
+: '$Id$'
+
+: Compile and make dependencies. First argument is the file on which the
+: dependencies must be produced. This version is a generic one that should
+: work for all Unix systems.
+n=$1
+shift
+cpp_args=
+for i in $*
+do
+ case $i in
+ -I*|-D*|-U*) cpp_args="$cpp_args $i"
+ ;;
+ -*) ;;
+ *) cpp_args="$cpp_args $i"
+ ;;
+ esac
+done
++$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n 2>/dev/null
+exec $CC $*
--- /dev/null
++#!/bin/sh
+: '$Id$'
+
+: Compile and make dependencies. First argument is the file on which the
+: dependencies must be produced. This version is for the SUN cc.
+n=$1
+shift
+exec $CC -Qpath $UTIL_HOME/lib.bin -Qoption cpp -d$n -Qoption cpp -m $*
--- /dev/null
++#!/bin/sh
+: '$Id$'
+
+: Produce dependencies for all argument files
+
+for i in $*
+do
+ n=`basename $i .c`
+ if [ -f $n.dep ]
+ then
+ :
+ else
+ echo $n.'$(SUF): '$i > $n.dep
+ echo " head -5 $n.dep > $n.dp1" >> $n.dep
+ echo ' CC="$(CC)" UTIL_HOME="$(UTIL_HOME)" $(CC_AND_MKDEP) '$n.dp2 '$(CFLAGS)' -c $i >> $n.dep
+ echo " cat $n.dp1 $n.dp2 > $n.dep" >> $n.dep
+ echo " rm -f $n.dp1 $n.dp2" >> $n.dep
+ fi
+done
--- /dev/null
++#!/bin/sh
+: '$Id$'
+
+: Resolve name clashes in the files on the argument list. If these
+: files reside in another directory, a copy is made in the current
+: directory. If not, it is overwritten. Never do this in a source
+: directory! A list of the new files is produced on standard output.
+
+UTIL_BIN=$UTIL_HOME/bin
+
+trap "rm -f tmp$$ a.out nmclash.* longnames clashes" 0 1 2 3 15
+
+: first find out if we have to resolve problems with identifier significance.
+
+cat > nmclash.c <<'EOF'
+/* Accepted if many characters of long names are significant */
+abcdefghijklmnopr() { }
+abcdefghijklmnopq() { }
+main() { }
+EOF
+if $CC nmclash.c
+then : no identifier significance problem
+ for i in $*
+ do
+ echo $i
+ done
+else
+ $UTIL_BIN/prid -l7 $* > longnames
+
+ : remove code generating routines from the clashes list.
+ : code generating routine names start with C_.
+ : also remove names starting with flt_.
+
+ sed '/^C_/d' < longnames | sed '/^flt_/d' > tmp$$
+ $UTIL_BIN/cclash -c -l7 tmp$$ > clashes
+ for i in $*
+ do
+ $UTIL_BIN/cid -Fclashes < $i > tmp$$
+ n=`basename $i .xxx`
+ if cmp -s $n tmp$$
+ then
+ rm -f tmp$$
+ else
+ mv tmp$$ $n
+ fi
+ echo $n
+ done
+fi
--- /dev/null
++#!/bin/sh
+: '$Id$'
+
+: Create a lint library file. The name of the library file is constructed
+: from the first argument. The second argument indicates the directory where
+: the result is to be placed. This version is for ACK lint.
+
+n=$1
+shift
+d=$1
+shift
+lint -L$n $*
+mv $n.llb $d
--- /dev/null
++#!/bin/sh
+: '$Id$'
+
+: Create a lint library file. The name of the library file is constructed
+: from the first argument. The second argument indicates the directory where
+: the result is to be placed. This version is for Unix lint.
+
+n=$1
+shift
+d=$1
+shift
+/usr/bin/lint -C$n $*
+mv llib-l$n.ln $d
--- /dev/null
++#!/bin/sh
++
+num=`expr $1 : '.*\.\([1-8]\)'`
+
+if [ -d $2/man ] ; then : ; else mkdir $2/man ; fi
+if [ -f $2/man/head ] ; then : ; else cat > $2/man/head <<'EOF'
+.rn TH yy
+.de TH
+.di zz
+.yy "\\$1" "\\$2" "\\$3" "\\$4"
+.ds ]W 5th ACK distribution
+.ds ]D Amsterdam Compiler Kit
+.ds ]L "\\$3
+.di
+.rm zz
+..
+EOF
+fi
+if [ -d $2/man/man$num ] ; then : ; else mkdir $2/man/man$num ; fi
+cat $2/man/head $1 | sed "s!TARGETHOME!$2!" > $2/man/man$num/`expr //$1 : '.*/\([^/]*\)'`
--- /dev/null
++#!/bin/sh
+: $Id$
+
+: remove dependencies from a makefile, write result on standard output.
+: we cannot do this directly in a makefile because some make versions
+: have # start a comment, always.
+
+sed -e '/^#DEPENDENCIES/,$d' $1
+echo '#DEPENDENCIES'
--- /dev/null
++#!/bin/sh
++
+: ${CDIR=.}
+${DF-:} $CDIR .distr
+if test ! -r $DESTDIR/$CDIR/.distr
+then
+ echo ++ no .distr in $CDIR 1>&2
+ exit 0
+fi
+for i in `cat $DESTDIR/$CDIR/.distr`
+do
+ if test -d $i
+ then
+ ( if cd $i
+ then
+ CDIR=$CDIR/$i
+ export CDIR
+ exec $DDIR/dwalk $*
+ else
+ echo ++ Could not access $CDIR/$i 1>&2
+ fi
+ )
+ else
+ ${DF-:} $CDIR $i
+ fi
+done
--- /dev/null
++#!/bin/sh
+: Utility to make a tree of symbolic links to source tree.
+: Mount the source tree read-only, use this script, and then try installation.
+case $# in
+2) ;;
+*) echo "Usage: $0 <source-tree> <symlink-tree>" 1>&2
+ exit 1
+ ;;
+esac
+if [ -f $1/.distr ]
+then
+ for i in `cat $1/.distr`
+ do
+ if [ -d $1/$i ]
+ then
+ if mkdir $2/$i && $0 $1/$i $2/$i
+ then
+ :
+ else
+ exit 2
+ fi
+ else
+ if [ -f $1/$i ]
+ then
+ if ln -s $1/$i $2/$i
+ then
+ :
+ else
+ exit 3
+ fi
+ else
+ echo "Missing file $1/$i" 1>&2
+ exit 4
+ fi
+ fi
+ done
+else
+ echo "No .distr file in $1" 1>&2
+ exit 5
+fi
--- /dev/null
++#!/bin/sh
++
+set -e
+for i in `tail +2 $DESTDIR/$1/LIST`
+do
+ ${DF-false} $1 $i
+done
+cd $DESTDIR/$1
+arch cDr `cat LIST`
+: I do not remove the files constituating the library, because
+: they might be present in .distr
--- /dev/null
++#!/bin/sh
++
+if [ -f $DESTDIR/$1/$2 ]
+then
+ :
+elif grep LIST $DESTDIR/$1/.distr >/dev/null 2>&1 &&
+ (test "$2" = "`head -1 $DESTDIR/$1/LIST`") >/dev/null 2>&1 &&
+ ${DA-false} "$1" "$2"
+then
+: Fetched library contents one by one and put them together
+elif ( cd $DESTDIR/$1 ; make distr ) > /dev/null 2>&1
+then
+ echo ++ $1/$2 made 1>&2
+elif ( cd $DESTDIR/$1 ; make $2 ) > /dev/null 2>&1
+then
+ echo ++ $1/$2 made 1>&2
+else
+ echo ++ $1/$2 not present 1>&2
+fi
--- /dev/null
++#!/bin/sh
++
+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$$
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
+#! /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
--- /dev/null
++#!/bin/sh
++
+if read ANS
+then echo
+else echo "Sorry, got EOF when reading your answer"
+ exit 1
+fi
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
- echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH" > $CONFIG/bin/TakeAction
- cat $SRC_HOME/TakeAction >> $CONFIG/bin/TakeAction
++#!/bin/sh
++
+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
+
++(
++ # Slight complication here to ensure that the #! magic at the
++ # beginning of TakeAction is preserved correctly.
++
++ head -1 $SRC_HOME/TakeAction
++ echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH"
++ tail +2 $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
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
++#!/usr/bin/make
+
+# 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
--- /dev/null
- echo "echo $SYSNAME" > $CONFIG/bin/ack_sys
++#!/bin/sh
++
+set -e
+
+create_dir $CONFIG
+
+create_dir $CONFIG/bin
++echo "#!/bin/sh" > $CONFIG/bin/ack_sys
++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
--- /dev/null
++#!/bin/sh
+: '$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
--- /dev/null
++#!/bin/sh
++
+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
--- /dev/null
++#!/bin/sh
+# 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
--- /dev/null
-
++#!/bin/sh
+# 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)
--- /dev/null
++#!/bin/sh
++
+ed -s Lpars.h <<'+'
+1d
+1,$s/# *define //
+1,$s/ ...$//
+1,$s/^/ "/
+1,$-1s/$/",/
+$s/$/"/
+0a
+char *tokentab[] = {
+.
+$a
+};
+.
+w tokentab.h
+q
++
--- /dev/null
++#!/bin/sh
++
+sed -e '
+s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+extern struct \1 *h_\1;\
+#ifdef DEBUG\
+extern int cnt_\1;\
+extern char *std_alloc();\
+#define new_\1() ((struct \1 *) std_alloc((char **)\&h_\1, sizeof(struct \1), \2, \&cnt_\1))\
+#else\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#endif\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:'
--- /dev/null
++#!/bin/sh
+: Update Files from database
+
+PATH=/bin:/usr/bin
+
+case $# in
+1) ;;
+*) echo use: $0 file >&2
+ exit 1
+esac
+
+(
+IFCOMMAND="if [ -r \$FN ] ;\
+ then if cmp -s \$FN \$TMP;\
+ then rm \$TMP;\
+ else mv \$TMP \$FN;\
+ echo update \$FN;\
+ fi;\
+ else mv \$TMP \$FN;\
+ echo create \$FN;\
+ fi"
+echo 'TMP=.uf$$'
+echo 'FN=$TMP'
+echo 'cat >$TMP <<\!EOF!'
+sed -n '/^!File:/,${
+/^$/d
+/^!File:[ ]*\(.*\)$/s@@!EOF!\
+'"$IFCOMMAND"'\
+FN=\1\
+cat >$TMP <<\\!EOF!@
+p
+}' $1
+echo '!EOF!'
+echo $IFCOMMAND
+) |
+sh
--- /dev/null
++#!/bin/sh
++
+sed -e '
+s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+extern struct \1 *h_\1;\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:'
--- /dev/null
++#!/bin/sh
+: Update Files from database
+
+PATH=/bin:/usr/bin
+
+case $# in
+1) ;;
+*) echo use: $0 file >&2
+ exit 1
+esac
+
+(
+IFCOMMAND="if [ -r \$FN ] ;\
+ then if cmp -s \$FN \$TMP;\
+ then rm \$TMP;\
+ else mv \$TMP \$FN;\
+ echo update \$FN;\
+ fi;\
+ else mv \$TMP \$FN;\
+ echo create \$FN;\
+ fi"
+echo 'TMP=.uf$$'
+echo 'FN=$TMP'
+echo 'cat >$TMP <<\!EOF!'
+sed -n '/^!File:/,${
+/^$/d
+/^!File:[ ]*\(.*\)$/s@@!EOF!\
+'"$IFCOMMAND"'\
+FN=\1\
+cat >$TMP <<\\!EOF!@
+p
+}' $1
+echo '!EOF!'
+echo $IFCOMMAND
+) |
+sh
--- /dev/null
++#!/bin/sh
++
+sed -e '
+s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+extern struct \1 *h_\1;\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:'
--- /dev/null
++#!/bin/sh
+: Update Files from database
+
+PATH=/bin:/usr/bin
+
+case $# in
+1) ;;
+*) echo use: $0 file >&2
+ exit 1
+esac
+
+(
+IFCOMMAND="if [ -r \$FN ] ;\
+ then if cmp -s \$FN \$TMP;\
+ then rm \$TMP;\
+ else mv \$TMP \$FN;\
+ echo update \$FN;\
+ fi;\
+ else mv \$TMP \$FN;\
+ echo create \$FN;\
+ fi"
+echo 'TMP=.uf$$'
+echo 'FN=$TMP'
+echo 'cat >$TMP <<\!EOF!'
+sed -n '/^!File:/,${
+/^$/d
+/^!File:[ ]*\(.*\)$/s@@!EOF!\
+'"$IFCOMMAND"'\
+FN=\1\
+cat >$TMP <<\\!EOF!@
+p
+}' $1
+echo '!EOF!'
+echo $IFCOMMAND
+) |
+sh
--- /dev/null
++#!/bin/sh
++
+sed -e '
+s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+extern struct \1 *h_\1;\
+#ifdef DEBUG\
+extern int cnt_\1;\
+extern char *std_alloc();\
+#define new_\1() ((struct \1 *) std_alloc((char **)\&h_\1, sizeof(struct \1), \2, \&cnt_\1))\
+#else\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#endif\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:' -e '
+s:^.*[ ]STATICALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+struct \1 *h_\1;\
+#ifdef DEBUG\
+int cnt_\1;\
+#define new_\1() ((struct \1 *) std_alloc((char **)\&h_\1, sizeof(struct \1), \2, \&cnt_\1))\
+#else\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#endif\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:'
--- /dev/null
++#!/bin/sh
+: Update Files from database
+
+PATH=/bin:/usr/bin
+
+case $# in
+1) ;;
+*) echo use: $0 file >&2
+ exit 1
+esac
+
+(
+IFCOMMAND="if [ -r \$FN ] ;\
+ then if cmp -s \$FN \$TMP;\
+ then rm \$TMP;\
+ else mv \$TMP \$FN;\
+ echo update \$FN;\
+ fi;\
+ else mv \$TMP \$FN;\
+ echo create \$FN;\
+ fi"
+echo 'TMP=.uf$$'
+echo 'FN=$TMP'
+echo 'cat >$TMP <<\!EOF!'
+sed -n '/^!File:/,${
+/^$/d
+/^!File:[ ]*\(.*\)$/s@@!EOF!\
+'"$IFCOMMAND"'\
+FN=\1\
+cat >$TMP <<\\!EOF!@
+p
+}' $1
+echo '!EOF!'
+echo $IFCOMMAND
+) |
+sh
--- /dev/null
++#!/bin/sh
++
+sed -e '
+s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+extern struct \1 *h_\1;\
+#ifdef DEBUG\
+extern int cnt_\1;\
+extern char *std_alloc();\
+#define new_\1() ((struct \1 *) std_alloc((char **)\&h_\1, sizeof(struct \1), \2, \&cnt_\1))\
+#else\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#endif\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:' -e '
+s:^.*[ ]STATICALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
+/* allocation definitions of struct \1 */\
+extern char *st_alloc();\
+struct \1 *h_\1;\
+#ifdef DEBUG\
+int cnt_\1;\
+#define new_\1() ((struct \1 *) std_alloc((char **)\&h_\1, sizeof(struct \1), \2, \&cnt_\1))\
+#else\
+#define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
+#endif\
+#define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
+:'
--- /dev/null
++#!/bin/sh
+: Update Files from database
+
+PATH=/bin:/usr/bin
+
+case $# in
+1) ;;
+*) echo use: $0 file >&2
+ exit 1
+esac
+
+(
+IFCOMMAND="if [ -r \$FN ] ;\
+ then if cmp -s \$FN \$TMP;\
+ then rm \$TMP;\
+ else mv \$TMP \$FN;\
+ echo update \$FN;\
+ fi;\
+ else mv \$TMP \$FN;\
+ echo create \$FN;\
+ fi"
+echo 'TMP=.uf$$'
+echo 'FN=$TMP'
+echo 'cat >$TMP <<\!EOF!'
+sed -n '/^!File:/,${
+/^$/d
+/^!File:[ ]*\(.*\)$/s@@!EOF!\
+'"$IFCOMMAND"'\
+FN=\1\
+cat >$TMP <<\\!EOF!@
+p
+}' $1
+echo '!EOF!'
+echo $IFCOMMAND
+) |
+sh