3 PLAN9=`pwd` export PLAN9
4 PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
6 echo "* Resetting $PLAN9/config"
10 if [ `uname` = Linux ]; then
11 # On Linux, we use the kernel version to decide whether
12 # to use pthreads or not. On 2.6 versions that aren't
13 # linking with NPTL by default, pretend to be an older kernel.
14 echo "* Running on Linux: checking for NPTL..."
15 gcc lib/linux-isnptl.c -lpthread
19 echo "SYSVERSION=2.6.x" >$PLAN9/config
21 echo " NPTL not found."
22 echo "SYSVERSION=2.4.x" >$PLAN9/config
27 if [ -f LOCAL.config ]; then
28 echo Using LOCAL.config options:
29 sed 's/^/ /' LOCAL.config
30 cat LOCAL.config >>config
34 if [ ! -x ../bin/mk ]; then
35 echo "* Building mk..."
36 ../dist/buildmk 2>&1 | sed 's/^[+] //'
38 if [ ! -x ../bin/mk ]; then
39 echo "* Error: mk failed to build."
43 echo "* Building everything (be patient)..."
47 if [ ! -x $PLAN9/src/cmd/o.cleanname -o ! -x $PLAN9/src/cmd/acme/o.acme ]; then
48 echo "* Warning: not all binaries built successfully."
50 echo "* Installing everything..."
52 if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme -o ! -x $PLAN9/bin/sam ]; then
54 echo "* Warning: not all binaries built successfully."
56 echo "* Cleaning up..."
58 if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/sam ]; then
59 # Cleanname and sam are needed for moveplan9.sh and the man updates.
60 if [ ! -x $PLAN9/bin/cleanname ]; then
62 echo "* Installation failed: $PLAN9/bin/cleanname does not exist."
65 if [ ! -x $PLAN9/bin/sam ]; then
67 echo "* Installation failed: $PLAN9/bin/sam does not exist."
70 echo "* NOT renaming hard-coded /usr/local/plan9 paths."
71 echo "* NOT building web manual."
73 echo "* Renaming hard-coded /usr/local/plan9 paths..."
76 echo "* Building web manual..."
79 echo cd `pwd`';' mk man
84 if [ -x LOCAL.INSTALL ]; then
85 echo "* Running local modifications..."
86 echo cd `pwd`';' ./LOCAL.INSTALL
92 echo "* Add these to your profile environment."
93 echo " PLAN9=$PLAN9 export PLAN9"
94 echo ' PATH=$PATH:$PLAN9/bin export PATH'
96 ) 2>&1 | tee install.log | awk -f $PLAN9/dist/isum.awk | tee install.sum