tMake install less chatty, more useful. - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 6637b803f6d99fe3410483ad404ba6f042c13989
DIR parent bdbc55d3524a3a93afad6fba08dfe5f774a3d2d2
HTML Author: rsc <devnull@localhost>
Date: Mon, 28 Nov 2005 21:14:44 +0000
Make install less chatty, more useful.
Diffstat:
M INSTALL | 55 +++++++++++++++++++++----------
M bin/9c | 2 +-
M dist/isum.awk | 3 +++
M src/mkfile | 3 ++-
M src/mkmk.sh | 4 ++++
5 files changed, 47 insertions(+), 20 deletions(-)
---
DIR diff --git a/INSTALL b/INSTALL
t@@ -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
t@@ -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
DIR diff --git a/bin/9c b/bin/9c
t@@ -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
DIR diff --git a/dist/isum.awk b/dist/isum.awk
t@@ -11,6 +11,9 @@ debug { print "# " $0 }
/^$/ { next }
+/^echo cd / { next }
+/^\+\+ pwd/ { next }
+
/^\* /{
if(debug) print "% mark"
print >out
DIR diff --git a/src/mkfile b/src/mkfile
t@@ -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 '
DIR diff --git a/src/mkmk.sh b/src/mkmk.sh
t@@ -1,4 +1,5 @@
cd lib9
+echo cd `pwd`
9c _exits.c
9c _p9dialparse.c
9c _p9dir.c
t@@ -144,6 +145,7 @@ cd lib9
mx1.adamsgaard.dk:70 /src/plan9port/commit/6637b803f6d99fe3410483ad404ba6f042c13989.gph:147: line too long