aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/mk
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-09-30 19:05:50 +0000
committerrsc <devnull@localhost>2003-09-30 19:05:50 +0000
commit522b0689c340d26feeac360640bf7e2e0582353c (patch)
treeba3a550c28684be3b3997899528a110c4e9cd91a /src/cmd/mk
parent2df2758496b2ab508d349208449f04d85ae2eb2c (diff)
downloadplan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.gz
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.bz2
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.zip
Reorg
Diffstat (limited to 'src/cmd/mk')
-rw-r--r--src/cmd/mk/Make.FreeBSD-3867
-rw-r--r--src/cmd/mk/Make.HP-UX-90006
-rw-r--r--src/cmd/mk/Make.Linux-3867
-rw-r--r--src/cmd/mk/Make.OSF1-alpha6
-rw-r--r--src/cmd/mk/Make.SunOS-sun4u2
-rw-r--r--src/cmd/mk/Make.SunOS-sun4u-cc6
-rw-r--r--src/cmd/mk/Make.SunOS-sun4u-gcc6
-rw-r--r--src/cmd/mk/Makefile88
-rw-r--r--src/cmd/mk/Makefile.MID45
-rw-r--r--src/cmd/mk/bundle.ports46
-rw-r--r--src/cmd/mk/mkfile9
-rw-r--r--src/cmd/mk/rpm.spec29
12 files changed, 4 insertions, 253 deletions
diff --git a/src/cmd/mk/Make.FreeBSD-386 b/src/cmd/mk/Make.FreeBSD-386
deleted file mode 100644
index 087ed3ab..00000000
--- a/src/cmd/mk/Make.FreeBSD-386
+++ /dev/null
@@ -1,7 +0,0 @@
-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
diff --git a/src/cmd/mk/Make.HP-UX-9000 b/src/cmd/mk/Make.HP-UX-9000
deleted file mode 100644
index edbdc111..00000000
--- a/src/cmd/mk/Make.HP-UX-9000
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=cc
-CFLAGS=-O -c -Ae -I.
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/cmd/mk/Make.Linux-386 b/src/cmd/mk/Make.Linux-386
deleted file mode 100644
index 74b0252c..00000000
--- a/src/cmd/mk/Make.Linux-386
+++ /dev/null
@@ -1,7 +0,0 @@
-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
diff --git a/src/cmd/mk/Make.OSF1-alpha b/src/cmd/mk/Make.OSF1-alpha
deleted file mode 100644
index 3d45279b..00000000
--- a/src/cmd/mk/Make.OSF1-alpha
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=cc
-CFLAGS+=-g -c -I.
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/cmd/mk/Make.SunOS-sun4u b/src/cmd/mk/Make.SunOS-sun4u
deleted file mode 100644
index c5fe67b8..00000000
--- a/src/cmd/mk/Make.SunOS-sun4u
+++ /dev/null
@@ -1,2 +0,0 @@
-include Make.SunOS-sun4u-$(CC)
-NAN=nan64.$O
diff --git a/src/cmd/mk/Make.SunOS-sun4u-cc b/src/cmd/mk/Make.SunOS-sun4u-cc
deleted file mode 100644
index 829301de..00000000
--- a/src/cmd/mk/Make.SunOS-sun4u-cc
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=cc
-CFLAGS+=-g -c -I. -O
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/cmd/mk/Make.SunOS-sun4u-gcc b/src/cmd/mk/Make.SunOS-sun4u-gcc
deleted file mode 100644
index 5c415948..00000000
--- a/src/cmd/mk/Make.SunOS-sun4u-gcc
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=gcc
-CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/cmd/mk/Makefile b/src/cmd/mk/Makefile
index df21b60d..4a718460 100644
--- a/src/cmd/mk/Makefile
+++ b/src/cmd/mk/Makefile
@@ -1,27 +1,7 @@
-
-# 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=
+9SRC=..
+include $(9SRC)/Makehdr
TARG=mk
-VERSION=2.0
-PORTPLACE=devel/mk
-NAME=mk
OFILES=\
arc.$O\
@@ -51,67 +31,7 @@ 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
-
-
-$(TARG): $(OFILES)
- $(CC) -o $(TARG) $(OFILES) -L$(PREFIX)/lib -lregexp9 -lbio -lfmt -lutf
-
-
-.c.$O:
- $(CC) $(CFLAGS) -I$(PREFIX)/include $*.c
-
-%.$O: %.c
- $(CC) $(CFLAGS) -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)
+LDFLAGS+=-lregexp9 -lbio -lfmt -lutf
-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
+include $(9SRC)/Makeone
-.phony: all clean nuke install tgz rpm ports
diff --git a/src/cmd/mk/Makefile.MID b/src/cmd/mk/Makefile.MID
deleted file mode 100644
index f840b18e..00000000
--- a/src/cmd/mk/Makefile.MID
+++ /dev/null
@@ -1,45 +0,0 @@
-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
-
diff --git a/src/cmd/mk/bundle.ports b/src/cmd/mk/bundle.ports
deleted file mode 100644
index 46498310..00000000
--- a/src/cmd/mk/bundle.ports
+++ /dev/null
@@ -1,46 +0,0 @@
---- Makefile ---
-# New ports collection makefile for: mk
-# Date Created: 11 Feb 2003
-# Whom: rsc
-#
-# THIS LINE NEEDS REPLACING. IT'S HERE TO GET BY PORTLINT
-# $FreeBSD: ports/devel/mk/Makefile,v 1.1 2003/02/12 00:51:22 rsc Exp $
-
-PORTNAME= mk
-PORTVERSION= 2.0
-CATEGORIES= devel
-MASTER_SITES= http://pdos.lcs.mit.edu/~rsc/software/
-EXTRACT_SUFX= .tgz
-
-MAINTAINER= rsc@post.harvard.edu
-
-DEPENDS= ${PORTSDIR}/devel/libutf \
- ${PORTSDIR}/devel/libfmt \
- ${PORTSDIR}/devel/libbio \
- ${PORTSDIR}/devel/libregexp9
-
-MAN1= mk.1
-USE_REINPLACE= yes
-
-.include <bsd.port.pre.mk>
-
-post-patch:
- ${REINPLACE_CMD} -e 's,$$(PREFIX),${PREFIX},g' ${WRKSRC}/Makefile
-
-.include <bsd.port.post.mk>
---- pkg-comment ---
-Streamlined replacement for make
---- pkg-descr ---
-Mk is a streamlined replacement for make, written for
-Tenth Edition Research Unix by Andrew Hume.
-
-WWW: http://pdos.lcs.mit.edu/~rsc/software/#mk
-
-Russ Cox
-rsc@post.harvard.edu
---- pkg-plist ---
-bin/mk
-doc/mk.pdf
---- /dev/null ---
-This is just a way to make sure blank lines don't
-creep into pkg-plist.
diff --git a/src/cmd/mk/mkfile b/src/cmd/mk/mkfile
deleted file mode 100644
index 10151356..00000000
--- a/src/cmd/mk/mkfile
+++ /dev/null
@@ -1,9 +0,0 @@
-all:V: Makefile Make.FreeBSD-386 Make.Linux-386 Make.HP-UX-9000 Make.OSF1-alpha \
- Make.SunOS-sun4u Make.SunOS-sun4u-cc Make.SunOS-sun4u-gcc \
- Make.NetBSD-386 Make.Darwin-PowerMacintosh
-
-Makefile:D: ../libutf/Makefile.TOP Makefile.MID ../libutf/Makefile.CMD ../libutf/Makefile.BOT
- cat $prereq >$target
-
-Make.%: ../libutf/Make.%
- cp $prereq $target
diff --git a/src/cmd/mk/rpm.spec b/src/cmd/mk/rpm.spec
deleted file mode 100644
index be75e6b8..00000000
--- a/src/cmd/mk/rpm.spec
+++ /dev/null
@@ -1,29 +0,0 @@
-Summary: Streamlined replacement for make
-Name: mk
-Version: 2.0
-Release: 1
-Group: Development/Utils
-Copyright: Public Domain
-Packager: Russ Cox <rsc@post.harvard.edu>
-Source: http://pdos.lcs.mit.edu/~rsc/software/mk-2.0.tgz
-URL: http://pdos.lcs.mit.edu/~rsc/software/#mk
-Requires: libfmt libbio libregexp9 libutf
-
-%description
-Mk is a streamlined replacement for make, written for
-Tenth Edition Research Unix by Andrew Hume.
-
-http://plan9.bell-labs.com/sys/doc/mk.pdf
-%prep
-%setup
-
-%build
-make
-
-%install
-make install
-
-%files
-/usr/local/doc/mk.pdf
-/usr/local/man/man1/mk.1
-/usr/local/bin/mk