Commit Diff


commit - bdbc55d3524a3a93afad6fba08dfe5f774a3d2d2
commit + 6637b803f6d99fe3410483ad404ba6f042c13989
blob - 0c85dcdb251ecea7ea254f3cdb82fafd09e50af2
blob + 05fa1bb9b26929c5e3ae6e37152b77e164a3dfb4
--- INSTALL
+++ INSTALL
@@ -30,9 +30,16 @@ if [ -f LOCAL.config ]; then
 	cat LOCAL.config >>config
 fi
 
-echo "* Building mk..."
 cd src
-make
+if [ ! -x ../bin/mk ]; then
+	echo "* Building mk..."
+	../dist/buildmk 2>&1 | sed 's/^[+] //'
+fi
+if [ ! -x ../bin/mk ]; then
+	echo "* Error: mk failed to build."
+	exit 1
+fi
+
 echo "* Building everything (be patient)..."
 mk clean
 mk libs-nuke
@@ -42,29 +49,41 @@ if [ ! -x $PLAN9/src/cmd/o.cleanname -o ! -x $PLAN9/sr
 fi
 echo "* Installing everything..."
 mk install || exit 1
-if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme ]; then
+if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme -o ! -x $PLAN9/bin/sam ]; then
 	echo " "
 	echo "* Warning: not all binaries built successfully."
 fi
-if [ ! -x $PLAN9/bin/cleanname ]; then
-	echo " "
-	echo "* Installation failed: $PLAN9/bin/cleanname does not exist."
-	exit 1
-fi
 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
-	echo cd `pwd`';' mk man
-	mk man
-)
+if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/sam ]; then
+	# Cleanname and sam are needed for moveplan9.sh and the man updates.
+	if [ ! -x $PLAN9/bin/cleanname ]; then
+		echo " "
+		echo "* Installation failed: $PLAN9/bin/cleanname does not exist."
+		exit 1
+	fi
+	if [ ! -x $PLAN9/bin/sam ]; then
+		echo " "
+		echo "* Installation failed: $PLAN9/bin/sam does not exist."
+		exit 1
+	fi
+	echo "* NOT renaming hard-coded /usr/local/plan9 paths."
+	echo "* NOT building web manual."
+else
+	echo "* Renaming hard-coded /usr/local/plan9 paths..."
+	cd $PLAN9
+	sh lib/moveplan9.sh
+	echo "* Building web manual..."
+	(
+		cd $PLAN9/dist
+		echo cd `pwd`';' mk man
+		mk man
+	)
+fi
+
 if [ -x LOCAL.INSTALL ]; then
 	echo "* Running local modifications..."
-	echo ./LOCAL.INSTALL
+	echo cd `pwd`';' ./LOCAL.INSTALL
 	./LOCAL.INSTALL
 fi
 
blob - 65f4e5ac637b079925de8f9db2dbe7b2ce9aa0fe
blob + f29d664ecfffef732949a5cf232b8fe29f81d471
--- bin/9c
+++ bin/9c
@@ -67,7 +67,7 @@ xtmp=/tmp/9c.$$.$USER.out
 $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp
 status=$?
 grep -v '__p9l_autolib_' $xtmp |
-egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is almost always misused|: In function `|: At top level:' |
+egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function `|: At top level:' |
 sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' |
 uniq 1>&2
 rm -f $xtmp $xtmp.status
blob - db782c8b586c4c656f06e0c3dc6deda44a199ac2
blob + 64f89efee508829c646fd29c95141f369dcaaa47
--- dist/isum.awk
+++ dist/isum.awk
@@ -11,6 +11,9 @@ debug { print "# " $0 }
 
 /^$/ { next }
 
+/^echo cd / { next }
+/^\+\+ pwd/ { next }
+
 /^\* /{
 	if(debug) print "% mark"
 	print >out
blob - 06e0b03acb7cb33d7cbd4aabd6b1d0cfef803dfc
blob + a6720110ec97077c47c6e8b0d28bf3d5be83884c
--- src/mkfile
+++ src/mkfile
@@ -25,11 +25,12 @@ MKDIRS=\
 mkmk.sh:VD:
 	(
 		echo cd lib9
+		echo 'echo cd `pwd`'
 		(cd lib9; mk -n -a install)
 		echo cd ..
 		for i in libbio libregexp cmd/mk
 		do	
-			(cd $i; echo cd `pwd`; mk -n -a install)
+			(cd $i; echo cd $i; echo 'echo cd `pwd`'; mk -n -a install)
 			echo cd ..
 		done
 	) | sed '
blob - cc7b28f5731c4ae3074f143338d8fc9b1da6ebcd
blob + 9d3ad04b5ecb793f924f818a910e6e017ed8c8b9
--- src/mkmk.sh
+++ src/mkmk.sh
@@ -1,4 +1,5 @@
 cd lib9
+echo cd `pwd`
 9c  _exits.c
 9c  _p9dialparse.c
 9c  _p9dir.c
@@ -144,6 +145,7 @@ cd lib9
 9ar rvc $PLAN9/lib/lib9.a _exits.o _p9dialparse.o _p9dir.o announce.o argv0.o atexit.o atoi.o atol.o atoll.o atnotify.o await.o cistrcmp.o cistrncmp.o cistrstr.o cleanname.o convD2M.o convM2D.o convM2S.o convS2M.o create.o crypt.o ctime.o date.o dial.o dirfstat.o dirfwstat.o dirmodefmt.o dirread.o dirstat.o dirwstat.o dup.o encodefmt.o errstr.o exec.o execl.o fcallfmt.o get9root.o getcallerpc-$OBJTYPE.o getenv.o getfields.o getnetconn.o getns.o getuser.o getwd.o jmp.o lrand.o lnrand.o main.o malloc.o malloctag.o mallocz.o nan.o needsrcquote.o needstack.o netcrypt.o netmkaddr.o notify.o nrand.o nulldir.o open.o opentemp.o pipe.o post9p.o postnote.o qlock.o quote.o rand.o read9pmsg.o readcons.o readn.o rfork.o searchpath.o seek.o sendfd.o sleep.o strdup.o strecpy.o sysfatal.o syslog.o sysname.o time.o tokenize.o truerand.o u16.o u32.o u64.o unsharp.o wait.o waitpid.o dofmt.o fltfmt.o fmt.o fmtfd.o fmtfdflush.o fmtlock2.o fmtprint.o fmtquote.o fmtrune.o fmtstr.o fmtvprint.o fprint.o nan64.o print.o runefmtstr.o runeseprint.o runesmprint.o runesnprint.o runesprint.o runevseprint.o runevsmprint.o runevsnprint.o seprint.o smprint.o snprint.o sprint.o strtod.o vfprint.o vseprint.o vsmprint.o vsnprint.o charstod.o pow10.o rune.o runestrcat.o runestrchr.o runestrcmp.o runestrcpy.o runestrdup.o runestrlen.o runestrecpy.o runestrncat.o runestrncmp.o runestrncpy.o runestrrchr.o runestrstr.o runetype.o utfecpy.o utflen.o utfnlen.o utfrrune.o utfrune.o utfutf.o
 cd ..
 cd libbio
+echo cd `pwd`
 9c  bbuffered.c
 9c  bfildes.c
 9c  bflush.c
@@ -164,6 +166,7 @@ cd libbio
 9ar rvc $PLAN9/lib/libbio.a bbuffered.o bfildes.o bflush.o bgetc.o bgetrune.o bgetd.o binit.o boffset.o bprint.o bputc.o bputrune.o brdline.o brdstr.o bread.o bseek.o bvprint.o bwrite.o
 cd ..
 cd libregexp
+echo cd `pwd`
 9c  regcomp.c
 9c  regerror.c
 9c  regexec.c
@@ -174,6 +177,7 @@ cd libregexp
 9ar rvc $PLAN9/lib/libregexp9.a regcomp.o regerror.o regexec.o regsub.o regaux.o rregexec.o rregsub.o
 cd ..
 cd cmd/mk
+echo cd `pwd`
 9c  arc.c
 9c  archive.c
 9c  bufblock.c