Build Unix-friendly versions directly from library.

This commit is contained in:
rsc 2004-03-01 19:36:29 +00:00
parent 63dd44c8ca
commit aa73861453
34 changed files with 966 additions and 0 deletions

View file

@ -0,0 +1,6 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

View file

@ -0,0 +1,7 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
NAN=nan64.$O

View file

@ -0,0 +1,6 @@
CC=cc
CFLAGS=-O -c -Ae -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

7
unix/make/Make.Linux-386 Normal file
View file

@ -0,0 +1,7 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
NAN=nan64.$O

View file

@ -0,0 +1,7 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
NAN=nan64.$O

View file

@ -0,0 +1,6 @@
CC=cc
CFLAGS+=-g -c -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

View file

@ -0,0 +1,2 @@
include Make.SunOS-sun4u-$(CC)
NAN=nan64.$O

View file

@ -0,0 +1,6 @@
CC=cc
CFLAGS+=-g -c -I. -O
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

View file

@ -0,0 +1,6 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

47
unix/make/Makefile.BOT Normal file
View file

@ -0,0 +1,47 @@
.c.$O:
$(CC) $(CFLAGS) -I../libutf -I../libfmt -I../libbio -I../libregexp -I$(PREFIX)/include $*.c
%.$O: %.c
$(CC) $(CFLAGS) -I../libutf -I../libfmt -I../libbio -I../libregexp -I$(PREFIX)/include $*.c
$(OFILES): $(HFILES)
tgz:
rm -rf $(NAME)-$(VERSION)
mkdir $(NAME)-$(VERSION)
cp Makefile Make.* README LICENSE NOTICE *.[ch137] rpm.spec bundle.ports $(TGZFILES) $(NAME)-$(VERSION)
tar cf - $(NAME)-$(VERSION) | gzip >$(NAME)-$(VERSION).tgz
rm -rf $(NAME)-$(VERSION)
clean:
rm -f $(OFILES) $(LIB)
nuke:
rm -f $(OFILES) *.tgz *.rpm $(NUKEFILES)
rpm:
make tgz
cp $(NAME)-$(VERSION).tgz /usr/src/RPM/SOURCES
rpm -ba rpm.spec
cp /usr/src/RPM/SRPMS/$(NAME)-$(VERSION)-1.src.rpm .
cp /usr/src/RPM/RPMS/i586/$(NAME)-$(VERSION)-1.i586.rpm .
scp *.rpm rsc@amsterdam.lcs.mit.edu:public_html/software
PORTDIR=/usr/ports/$(PORTPLACE)
ports:
make tgz
rm -rf $(PORTDIR)
mkdir $(PORTDIR)
cp $(NAME)-$(VERSION).tgz /usr/ports/distfiles
cat bundle.ports | (cd $(PORTDIR) && awk '$$1=="---" && $$3=="---" { ofile=$$2; next} {if(ofile) print >ofile}')
(cd $(PORTDIR); make makesum)
(cd $(PORTDIR); make)
(cd $(PORTDIR); /usr/local/bin/portlint)
rm -rf $(PORTDIR)/work
shar `find $(PORTDIR)` > ports.shar
(cd $(PORTDIR); tar cf - *) | gzip >$(NAME)-$(VERSION)-ports.tgz
scp *.tgz rsc@amsterdam.lcs.mit.edu:public_html/software
.phony: all clean nuke install tgz rpm ports

5
unix/make/Makefile.CMD Normal file
View file

@ -0,0 +1,5 @@
$(TARG): $(OFILES)
$(CC) -o $(TARG) $(OFILES) -L$(PREFIX)/lib -L../libutf -L../libfmt -L../libbio -L../libregexp -lregexp9 -lbio -lfmt -lutf

4
unix/make/Makefile.LIB Normal file
View file

@ -0,0 +1,4 @@
$(LIB): $(OFILES)
$(AR) $(ARFLAGS) $(LIB) $(OFILES)
NUKEFILES+=$(LIB)

41
unix/make/Makefile.MID Normal file
View file

@ -0,0 +1,41 @@
LIB=libutf.a
VERSION=2.0
PORTPLACE=devel/libutf
NAME=libutf
OFILES=\
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\
HFILES=\
utf.h\
all: $(LIB)
install: $(LIB)
test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
install -c -m 0644 isalpharune.3 $(PREFIX)/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 utf.h $(PREFIX)/include/utf.h
install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)

20
unix/make/Makefile.TOP Normal file
View file

@ -0,0 +1,20 @@
# this works in gnu make
SYSNAME:=${shell uname}
OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'}
# this works in bsd make
SYSNAME!=uname
OBJTYPE!=uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'
# the gnu rules will mess up bsd but not vice versa,
# hence the gnu rules come first.
include Make.$(SYSNAME)-$(OBJTYPE)
PREFIX=/usr/local
NUKEFILES=
TGZFILES=

38
unix/make/Makefile.bio Normal file
View file

@ -0,0 +1,38 @@
LIB=libbio.a
VERSION=2.0
PORTPLACE=devel/libbio
NAME=libbio
OFILES=\
bbuffered.$O\
bfildes.$O\
bflush.$O\
bfmt.$O\
bgetc.$O\
bgetd.$O\
bgetrune.$O\
binit.$O\
boffset.$O\
bprint.$O\
bputc.$O\
bputrune.$O\
brdline.$O\
brdstr.$O\
bread.$O\
bseek.$O\
bwrite.$O\
HFILES=\
bio.h\
all: $(LIB)
install: $(LIB)
test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
install -m 0644 bio.3 $(PREFIX)/man/man3/bio.3
install -m 0644 bio.h $(PREFIX)/include
install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
bcat: bcat.$O $(LIB)
$(CC) -o bcat bcat.$O $(LIB) -L/usr/local/lib -lfmt -lutf

64
unix/make/Makefile.fmt Normal file
View file

@ -0,0 +1,64 @@
LIB=libfmt.a
VERSION=2.0
PORTPLACE=devel/libfmt
NAME=libfmt
NUM=\
charstod.$O\
pow10.$O\
OFILES=\
dofmt.$O\
dorfmt.$O\
errfmt.$O\
fltfmt.$O\
fmt.$O\
fmtfd.$O\
fmtfdflush.$O\
fmtlock.$O\
fmtprint.$O\
fmtquote.$O\
fmtrune.$O\
fmtstr.$O\
fmtvprint.$O\
fprint.$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\
$(NUM)\
$(NAN)\
HFILES=\
fmtdef.h\
fmt.h\
all: $(LIB)
install: $(LIB)
test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
install -m 0644 print.3 $(PREFIX)/man/man3/print.3
install -m 0644 fmtinstall.3 $(PREFIX)/man/man3/fmtinstall.3
install -m 0644 fmt.h $(PREFIX)/include/fmt.h
install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
$(NAN).$O: nan.h
strtod.$O: nan.h
test: $(LIB) test.$O
$(CC) -o test test.$O $(LIB) -L$(PREFIX)/lib -lutf

45
unix/make/Makefile.mk Normal file
View file

@ -0,0 +1,45 @@
TARG=mk
VERSION=2.0
PORTPLACE=devel/mk
NAME=mk
OFILES=\
arc.$O\
archive.$O\
bufblock.$O\
env.$O\
file.$O\
graph.$O\
job.$O\
lex.$O\
main.$O\
match.$O\
mk.$O\
parse.$O\
recipe.$O\
rule.$O\
run.$O\
sh.$O\
shprint.$O\
symtab.$O\
var.$O\
varsub.$O\
word.$O\
unix.$O\
HFILES=\
mk.h\
fns.h\
all: $(TARG)
TGZFILES+=mk.pdf
install: $(LIB)
test -d $(PREFIX)/man/man1 || mkdir $(PREFIX)/man/man1
test -d $(PREFIX)/doc || mkdir $(PREFIX)/doc
install -m 0755 mk $(PREFIX)/bin/mk
cat mk.1 | sed 's;DOCPREFIX;$(PREFIX);g' >mk.1a
install -m 0644 mk.1a $(PREFIX)/man/man1/mk.1
install -m 0644 mk.pdf $(PREFIX)/doc/mk.pdf

35
unix/make/Makefile.regexp Normal file
View file

@ -0,0 +1,35 @@
LIB=libregexp9.a
VERSION=2.0
PORTPLACE=devel/libregexp9
NAME=libregexp9
OFILES=\
regcomp.$O\
regerror.$O\
regexec.$O\
regsub.$O\
regaux.$O\
rregexec.$O\
rregsub.$O\
rregaux.$O\
HFILES=\
regexp9.h\
regcomp.h\
all: $(LIB)
install: $(LIB)
test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
test -d $(PREFIX)/man/man7 || mkdir $(PREFIX)/man/man7
install -m 0644 regexp9.3 $(PREFIX)/man/man3/regexp9.3
install -m 0644 regexp9.7 $(PREFIX)/man/man7/regexp9.7
install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
install -m 0644 regexp9.h $(PREFIX)/include/regexp9.h
test: test.$O $(LIB)
$(CC) -o test test.$O $(LIB) -L/usr/local/lib -lfmt -lutf
test2: test2.$O $(LIB)
$(CC) -o test2 test2.$O $(LIB) -L/usr/local/lib -lfmt -lutf

41
unix/make/Makefile.utf Normal file
View file

@ -0,0 +1,41 @@
LIB=libutf.a
VERSION=2.0
PORTPLACE=devel/libutf
NAME=libutf
OFILES=\
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\
HFILES=\
utf.h\
all: $(LIB)
install: $(LIB)
test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
install -c -m 0644 isalpharune.3 $(PREFIX)/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 utf.h $(PREFIX)/include/utf.h
install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)