diff options
-rw-r--r-- | unix/make/Makefile.MID | 8 | ||||
-rw-r--r-- | unix/make/Makefile.bio | 4 | ||||
-rw-r--r-- | unix/make/Makefile.fmt | 7 | ||||
-rw-r--r-- | unix/make/Makefile.regexp | 4 | ||||
-rw-r--r-- | unix/make/Makefile.utf | 8 | ||||
-rw-r--r-- | unix/mkfile | 14 | ||||
-rw-r--r-- | unix/mkfile.fmt | 18 | ||||
-rw-r--r-- | unix/mkfile.utf | 12 |
8 files changed, 51 insertions, 24 deletions
diff --git a/unix/make/Makefile.MID b/unix/make/Makefile.MID index 9c142d44..71a9d019 100644 --- a/unix/make/Makefile.MID +++ b/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) diff --git a/unix/make/Makefile.bio b/unix/make/Makefile.bio index 00a0b697..f862aac5 100644 --- a/unix/make/Makefile.bio +++ b/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 diff --git a/unix/make/Makefile.fmt b/unix/make/Makefile.fmt index 3a078401..2cf5f629 100644 --- a/unix/make/Makefile.fmt +++ b/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 diff --git a/unix/make/Makefile.regexp b/unix/make/Makefile.regexp index fae24c5d..f4c862de 100644 --- a/unix/make/Makefile.regexp +++ b/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) diff --git a/unix/make/Makefile.utf b/unix/make/Makefile.utf index 10e72309..78601bbc 100644 --- a/unix/make/Makefile.utf +++ b/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 diff --git a/unix/mkfile b/unix/mkfile index 3d9d35a2..42560bb5 100644 --- a/unix/mkfile +++ b/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 diff --git a/unix/mkfile.fmt b/unix/mkfile.fmt index c85852cc..d88525e8 100644 --- a/unix/mkfile.fmt +++ b/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 + diff --git a/unix/mkfile.utf b/unix/mkfile.utf index 581c4e09..a001da43 100644 --- a/unix/mkfile.utf +++ b/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 + |