Commit Diff


commit - 9f0d3523fc61e53d6348d628df6fd16a7543cec4
commit + f5fcdeeedfd70da11a3990d3d91fe165f0bf8ef7
blob - 9c142d44a7be8d74bb3b2b6a32eff62b2a641fff
blob + 71a9d019f4dee13833d8626c0fc219872099d747
--- unix/make/Makefile.MID
+++ unix/make/Makefile.MID
@@ -31,11 +31,11 @@ HFILES=\
 all: $(LIB)
 
 install: $(LIB)
-	test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
-	install -c -m 0644 isalpharune.3 $(PREFIX)/man/man3/isalpharune.3
+	test -d $(PREFIX)/share/man/man3 || mkdir $(PREFIX)/share/man/man3
+	install -c -m 0644 isalpharune.3 $(PREFIX)/share/man/man3/isalpharune.3
 	install -c -m 0644 utf.7 $(PREFIX)/man/man7/utf.7
-	install -c -m 0644 rune.3 $(PREFIX)/man/man3/rune.3
-	install -c -m 0644 runestrcat.3 $(PREFIX)/man/man3/runestrcat.3
+	install -c -m 0644 rune.3 $(PREFIX)/share/man/man3/rune.3
+	install -c -m 0644 runestrcat.3 $(PREFIX)/share/man/man3/runestrcat.3
 	install -c -m 0644 utf.h $(PREFIX)/include/utf.h
 	install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
 
blob - 00a0b6976ef0896ba1f6c97adc6d5106159eb638
blob + f862aac52177c7eee255a0ec517f00c9d910c414
--- unix/make/Makefile.bio
+++ unix/make/Makefile.bio
@@ -28,8 +28,8 @@ HFILES=\
 all: $(LIB)
 
 install: $(LIB)
-	mkdir -p $(PREFIX)/man/man3
-	install -m 0644 bio.3 $(PREFIX)/man/man3/bio.3
+	mkdir -p $(PREFIX)/share/man/man3
+	install -m 0644 bio.3 $(PREFIX)/share/man/man3/bio.3
 	mkdir -p $(PREFIX)/include
 	install -m 0644 bio.h $(PREFIX)/include
 	mkdir -p $(PREFIX)/lib
blob - 3a0784013a109fc18db9c85e6a5eb14010d01f22
blob + 2cf5f629b29e8d89818fb4521d4b1fb386ce173f
--- unix/make/Makefile.fmt
+++ unix/make/Makefile.fmt
@@ -17,6 +17,7 @@ OFILES=\
 	fmtfdflush.$O\
 	fmtlocale.$O\
 	fmtlock.$O\
+	fmtnull.$O\
 	fmtprint.$O\
 	fmtquote.$O\
 	fmtrune.$O\
@@ -51,9 +52,9 @@ HFILES=\
 all: $(LIB)
 
 install: $(LIB)
-	test -d $(PREFIX)/man/man3 || mkdir -p $(PREFIX)/man/man3
-	install -m 0644 print.3 $(PREFIX)/man/man3/print.3
-	install -m 0644 fmtinstall.3 $(PREFIX)/man/man3/fmtinstall.3
+	test -d $(PREFIX)/share/man/man3 || mkdir -p $(PREFIX)/share/man/man3
+	install -m 0644 print.3 $(PREFIX)/share/man/man3/print.3
+	install -m 0644 fmtinstall.3 $(PREFIX)/share/man/man3/fmtinstall.3
 	mkdir -p $(PREFIX)/include
 	install -m 0644 fmt.h $(PREFIX)/include/fmt.h
 	mkdir -p $(PREFIX)/lib
blob - fae24c5dc2a041c812e2e4e03381fa166b0c4fdf
blob + f4c862de116c180ccadad41f6d0952232c49fd04
--- unix/make/Makefile.regexp
+++ unix/make/Makefile.regexp
@@ -19,8 +19,8 @@ HFILES=\
 all: $(LIB)
 
 install: $(LIB)
-	mkdir -p $(PREFIX)/man/man3 $(PREFIX)/man/man7
-	install -m 0644 regexp9.3 $(PREFIX)/man/man3/regexp9.3
+	mkdir -p $(PREFIX)/share/man/man3 $(PREFIX)/man/man7
+	install -m 0644 regexp9.3 $(PREFIX)/share/man/man3/regexp9.3
 	install -m 0644 regexp9.7 $(PREFIX)/man/man7/regexp9.7
 	mkdir -p $(PREFIX)/lib
 	install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
blob - 10e7230957dac36841bc1e05a0f42536a7e09f4d
blob + 78601bbc472a482f9aa516f2aa0a8244e3b9fedd
--- unix/make/Makefile.utf
+++ unix/make/Makefile.utf
@@ -31,11 +31,11 @@ HFILES=\
 all: $(LIB)
 
 install: $(LIB)
-	mkdir -p $(PREFIX)/man/man3 $(PREFIX)/man/man7
-	install -c -m 0644 isalpharune.3 $(PREFIX)/man/man3/isalpharune.3
+	mkdir -p $(PREFIX)/share/man/man3 $(PREFIX)/man/man7
+	install -c -m 0644 isalpharune.3 $(PREFIX)/share/man/man3/isalpharune.3
 	install -c -m 0644 utf.7 $(PREFIX)/man/man7/utf.7
-	install -c -m 0644 rune.3 $(PREFIX)/man/man3/rune.3
-	install -c -m 0644 runestrcat.3 $(PREFIX)/man/man3/runestrcat.3
+	install -c -m 0644 rune.3 $(PREFIX)/share/man/man3/rune.3
+	install -c -m 0644 runestrcat.3 $(PREFIX)/share/man/man3/runestrcat.3
 	mkdir -p $(PREFIX)/include
 	install -c -m 0644 utf.h $(PREFIX)/include/utf.h
 	mkdir -p $(PREFIX)/lib
blob - 3d9d35a2a2261a65770347a4dc69b1d495277ff4
blob + 42560bb582ffcd85e02d37895bb1114c20f9a980
--- unix/mkfile
+++ unix/mkfile
@@ -17,14 +17,14 @@ test-%:V:
 	t=$stem
 	path=($PLAN9/bin $path)
 	mk new-$t
-	cd $t
 	switch($t){
-	case bio;	d=libbio
-	case regexp;	d=libregexp
-	case fmt;	d=lib9/fmt
-	case utf:	d=lib9/utf
-	case mk;	d=cmd/mk
+	case bio;	d=libbio; td=libbio
+	case regexp;	d=libregexp; td=libregexp
+	case fmt;	d=lib9/fmt; td=libfmt
+	case utf;	d=lib9/utf; td=libutf
+	case mk;	d=cmd/mk; td=mk
 	}
+	cd $td
 	d=$PLAN9/src/$d
 	for(i in `{ls -p $d/*.c})
 		if(! test -f $i)
@@ -34,7 +34,7 @@ test-%:V:
 		if(! test -f `{echo $i | sed 's/.c$/.o/'})
 			echo XXX not building $i
 	cd ..
-	rm -r $t
+	rm -r $td
 
 lib%.tgz:V:
 	mk new-$stem
blob - c85852cc75793f5626e1119e05acb76683040e75
blob + d88525e8d2900908721cbd79172c28a7112d10b9
--- unix/mkfile.fmt
+++ unix/mkfile.fmt
@@ -1,10 +1,12 @@
 MAKEALL=`{cd ../make; ls Make.*}
+CFILES=`{9 ls -p $PLAN9/src/lib9/fmt/*.c}
+CFILES1=`{9 ls -p $PLAN9/src/lib9/fmt/*.c |grep -v test}
 TARG=\
 	$MAKEALL\
+	$CFILES\
 	NOTICE\
 	README\
 	Makefile\
-	`{9 ls -p $PLAN9/src/lib9/fmt/*.c}\
 	fmt.h\
 	fmtdef.h\
 	nan.h\
@@ -19,3 +21,17 @@ WHAT=fmt
 %: $PLAN9/src/lib9/fmt/%
 	cp $prereq $target
 
+fmt1.c: plan9.h $CFILES1
+	(echo '#include <stdarg.h>'; \
+	 echo '#include <string.h>'; \
+	 echo '#include <stdlib.h>'; \
+	 echo '#include <errno.h>'; \
+	 echo '#include <limits.h>'; \
+	 echo '#include <math.h>'; \
+	 echo '#include <float.h>'; \
+	 cat plan9.h; \
+	 echo '#include "utf.h"'; \
+	 echo '#include "fmt.h"'; \
+	 cat fmtdef.h; \
+	 grep -hv '^#include' $CFILES1) >$target
+
blob - 581c4e09cfcec491d55aa1d7f227ba892e33cd32
blob + a001da43ef3ed7ab39be8b84e59c418e5f89bfd1
--- unix/mkfile.utf
+++ unix/mkfile.utf
@@ -1,10 +1,11 @@
 MAKEALL=`{cd ../make; ls Make.*}
+CFILES=`{9 ls -p $PLAN9/src/lib9/utf/*.c}
 TARG=\
 	$MAKEALL\
 	NOTICE\
 	README\
 	Makefile\
-	`{9 ls -p $PLAN9/src/lib9/utf/*.c}\
+	$CFILES\
 	plan9.h\
 	utf.h\
 	utfdef.h\
@@ -23,3 +24,12 @@ utf.h: $PLAN9/include/utf.h
 %: $PLAN9/src/lib9/utf/%
 	cp $prereq $target
 
+utf1.c:D: plan9.h $CFILES
+	(cat plan9.h; \
+	 echo '#include <stdlib.h>'; \
+	 echo '#include <string.h>'; \
+	 echo '#include <unistd.h>'; \
+	 echo '#define bsearch utf_bsearch'; \
+	 echo '#include "utf.h"'; \
+	 grep -hv '^#include' $CFILES) >$target
+