From 6637b803f6d99fe3410483ad404ba6f042c13989 Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 28 Nov 2005 21:14:44 +0000 Subject: Make install less chatty, more useful. --- INSTALL | 55 +++++++++++++++++++++++++++++++++++++------------------ bin/9c | 2 +- dist/isum.awk | 3 +++ src/mkfile | 3 ++- src/mkmk.sh | 4 ++++ 5 files changed, 47 insertions(+), 20 deletions(-) diff --git a/INSTALL b/INSTALL index 0c85dcdb..05fa1bb9 100755 --- a/INSTALL +++ b/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/src/cmd/acme/o.acme ]; then 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 diff --git a/bin/9c b/bin/9c index 65f4e5ac..f29d664e 100755 --- a/bin/9c +++ b/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 diff --git a/dist/isum.awk b/dist/isum.awk index db782c8b..64f89efe 100644 --- a/dist/isum.awk +++ b/dist/isum.awk @@ -11,6 +11,9 @@ debug { print "# " $0 } /^$/ { next } +/^echo cd / { next } +/^\+\+ pwd/ { next } + /^\* /{ if(debug) print "% mark" print >out diff --git a/src/mkfile b/src/mkfile index 06e0b03a..a6720110 100644 --- a/src/mkfile +++ b/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 ' diff --git a/src/mkmk.sh b/src/mkmk.sh index cc7b28f5..9d3ad04b 100644 --- a/src/mkmk.sh +++ b/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 -- cgit v1.2.3