aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
blob: 80c7bb2b2785772788364f69bc6843bd4839cc4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

PLAN9=`pwd` export PLAN9
PATH=$PLAN9/bin:$PATH export PATH

echo "Resetting $PLAN9/config"
rm -f $PLAN9/config

(
if [ `uname` = Linux ]; then
	# On Linux, we use the kernel version to decide whether
	# to use pthreads or not.  On 2.6 versions that aren't
	# linking with NPTL by default, pretend to be an older kernel.
	echo "Running on Linux: checking for NPTL..."
	gcc lib/linux-isnptl.c -lpthread
	if ./a.out
	then	
		echo "	NPTL found."
		echo "SYSVERSION=2.6" >$PLAN9/config
	else
		echo "	NPTL not found."
		echo "SYSVERSION=2.4" >$PLAN9/config
	fi
	rm -f ./a.out
fi
echo "Building mk..."
cd src
make
echo "Building everything..."
mk clean
mk libs-nuke
mk all
echo "Installing everything..."
mk install 
echo "Cleaning up..."
mk clean
echo "Renaming hard-coded /usr/local/plan9 paths..."
cd $PLAN9
sh lib/moveplan9.sh
echo "Building web manual..."
cd $PLAN9/dist; mk man


echo "Done. "
echo " "
echo "Add these to your profile environment."
echo "	PLAN9=$PLAN9 export PLAN9"
echo '	PATH=$PATH:'"$PLAN9/bin export PATH"

) 2>&1 | tee install.log