9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

commit 72181430fdf0be8f0706b3228c36ab65cc11e2f9
parent e5f0f74b8a25039c8e02ea45d97b979a79010ee3
Author: garbeam@mmv.wmii.de <unknown>
Date:   Sat, 17 Dec 2005 15:05:37 +0200

several chanes in Makefiles and rcmain installation

Diffstat:
MMakefile | 8++++----
Mawk/Makefile | 42++----------------------------------------
Mbasename/Makefile | 32+-------------------------------
Mbc/Makefile | 41++---------------------------------------
Mcat/Makefile | 32+-------------------------------
Mcleanname/Makefile | 32+-------------------------------
Mdate/Makefile | 32+-------------------------------
Mecho/Makefile | 32+-------------------------------
Mgrep/Makefile | 39+--------------------------------------
Mrc/Makefile | 23+++++++++--------------
Mrc/plan9ish.c | 2+-
Msed/Makefile | 32+-------------------------------
Mseq/Makefile | 32+-------------------------------
Msleep/Makefile | 33+--------------------------------
Msort/Makefile | 32+-------------------------------
Astd.mk | 32++++++++++++++++++++++++++++++++
Mtee/Makefile | 32+-------------------------------
Mtest/Makefile | 32+-------------------------------
Mtouch/Makefile | 32+-------------------------------
Mtr/Makefile | 32+-------------------------------
Muniq/Makefile | 32+-------------------------------
Myacc/9yacc | 0
Myacc/Makefile | 23+----------------------
Ayacc/yacc | 0
Ayacc/yacc.o | 0
25 files changed, 66 insertions(+), 593 deletions(-)

diff --git a/Makefile b/Makefile @@ -12,18 +12,18 @@ all: @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" @chmod 755 yacc/9yacc - @for i in ${SUBDIRS}; do cd $$i; ${MAKE} || exit; cd ..; done; + @for i in ${SUBDIRS}; do cd $$i; make || exit; cd ..; done; clean: - @for i in ${SUBDIRS}; do cd $$i; ${MAKE} clean || exit; cd ..; done + @for i in ${SUBDIRS}; do cd $$i; make clean || exit; cd ..; done @echo cleaned 9base install: all - @for i in ${SUBDIRS}; do cd $$i; ${MAKE} install || exit; cd ..; done + @for i in ${SUBDIRS}; do cd $$i; make install || exit; cd ..; done @echo installed 9base to ${DESTDIR}${PREFIX} uninstall: - @for i in ${SUBDIRS}; do cd $$i; ${MAKE} uninstall || exit; cd ..; done + @for i in ${SUBDIRS}; do cd $$i; make uninstall || exit; cd ..; done @echo uninstalled 9base dist: clean diff --git a/awk/Makefile b/awk/Makefile @@ -1,47 +1,9 @@ # awk - awk unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = awk - -OFILES = re.o lex.o main.o parse.o proctab.o tran.o lib.o run.o y.tab.o - +OFILES = re.o lex.o main.o parse.o proctab.o tran.o lib.o run.o y.tab.o YFILES = awkgram.y - MANFILES = awk.1 -all: - @if [ ! -f y.tab.c ]; then \ - ${MAKE} -f Makefile depend;\ - fi - @${MAKE} -f Makefile ${TARG} - @echo built ${TARG} - - -depend: - @echo YACC ${YFILES} - @${YACC} -d ${YFILES} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} y.tab.c y.tab.h - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -lm -L${PREFIX}/lib -L../lib9 -l9 +include ../yacc.mk diff --git a/basename/Makefile b/basename/Makefile @@ -1,36 +1,6 @@ # basename - basename unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = basename -OFILES = basename.o - -MANFILES = basename.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/bc/Makefile b/bc/Makefile @@ -1,46 +1,9 @@ # bc - bc unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = bc - -OFILES = y.tab.o - +OFILES = y.tab.o YFILES = bc.y - MANFILES = bc.1 -all: - @if [ ! -f y.tab.c ]; then \ - ${MAKE} -f Makefile depend;\ - fi - @${MAKE} -f Makefile ${TARG} - @echo built ${TARG} - -depend: - @echo YACC ${YFILES} - @${YACC} -d ${YFILES} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} y.tab.c y.tab.h - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -lm -L${PREFIX}/lib -L../lib9 -l9 +include ../yacc.mk diff --git a/cat/Makefile b/cat/Makefile @@ -1,36 +1,6 @@ # cat - cat unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = cat -OFILES = cat.o - -MANFILES = cat.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/cleanname/Makefile b/cleanname/Makefile @@ -1,36 +1,6 @@ # cleanname - cleanname unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = cleanname -OFILES = cleanname.o - -MANFILES = cleanname.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/date/Makefile b/date/Makefile @@ -1,36 +1,6 @@ # date - date unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = date -OFILES = date.o - -MANFILES = date.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/echo/Makefile b/echo/Makefile @@ -1,36 +1,6 @@ # echo - echo unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = echo -OFILES = echo.o - -MANFILES = echo.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/grep/Makefile b/grep/Makefile @@ -1,46 +1,9 @@ # grep - grep unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = grep - OFILES = y.tab.o main.o comp.o sub.o - YFILES = grep.y - MANFILES = grep.1 -all: - @if [ ! -f y.tab.c ]; then \ - ${MAKE} -f Makefile depend;\ - fi - @${MAKE} -f Makefile ${TARG} - @echo built ${TARG} - -depend: - @echo YACC ${YFILES} - @${YACC} -d ${YFILES} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} y.tab.c y.tab.h - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../yacc.mk diff --git a/rc/Makefile b/rc/Makefile @@ -1,25 +1,20 @@ # rc - rc shell unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = rc - OFILES = code.o exec.o getflags.o glob.o here.o io.o lex.o \ pcmd.o pfnc.o simple.o subr.o trap.o tree.o unixcrap.o \ var.o y.tab.o plan9ish.o - YFILES = syn.y - MANFILES = rc.1 -RCMAIN = rcmain +include ../config.mk all: @if [ ! -f y.tab.c ]; then \ - ${MAKE} -f Makefile depend;\ + make -f Makefile depend;\ fi - @${MAKE} -f Makefile ${TARG} + @make -f Makefile ${TARG} @echo built ${TARG} depend: @@ -30,25 +25,25 @@ install: ${TARG} @mkdir -p ${DESTDIR}${PREFIX}/bin @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/lib - @cp -f ${RCMAIN} ${DESTDIR}${PREFIX}/lib - @chmod 755 ${DESTDIR}${PREFIX}/lib/${RCMAIN} @mkdir -p ${DESTDIR}${MANPREFIX}/man1 @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} + @mkdir -p ${DESTDIR}${PREFIX}/etc + @cp -f rcmain ${DESTDIR}${PREFIX}/etc + @chmod 755 ${DESTDIR}${PREFIX}/etc/rcmain uninstall: rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/lib/${RCMAIN} rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} + rm -f ${DESTDIR}${PREFIX}/etc/rcmain .c.o: @echo CC $*.c @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c clean: - rm -f ${OFILES} ${TARG} y.tab.c x.tab.h + rm -f ${OFILES} ${TARG} y.tab.c y.tab.h ${TARG}: ${OFILES} @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 + @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -lm -L${PREFIX}/lib -L../lib9 -l9 diff --git a/rc/plan9ish.c b/rc/plan9ish.c @@ -27,7 +27,7 @@ char *syssigname[]={ char* Rcmain(void) { - static char Rcmain[] = PREFIX"/lib/rcmain"; + static char Rcmain[] = PREFIX"/etc/rcmain"; char *rcmain = getenv("RCMAIN"); return rcmain ? rcmain : Rcmain; } diff --git a/sed/Makefile b/sed/Makefile @@ -1,36 +1,6 @@ # sed - sed unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = sed -OFILES = sed.o - -MANFILES = sed.1 - -all: ${TARG} - echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/seq/Makefile b/seq/Makefile @@ -1,36 +1,6 @@ # seq - seq unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = seq -OFILES = seq.o - -MANFILES = seq.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/sleep/Makefile b/sleep/Makefile @@ -1,37 +1,6 @@ # sleep - sleep unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = sleep -OFILES = sleep.o - -MANFILES = sleep.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - @echo cleaned ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/sort/Makefile b/sort/Makefile @@ -1,36 +1,6 @@ # sort - sort unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = sort -OFILES = sort.o - -MANFILES = sort.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/std.mk b/std.mk @@ -0,0 +1,32 @@ +# std.mk - included by most Makefiles in subdirs + +OFILES = ${TARG}.o +MANFILES = ${TARG}.1 + +include ../config.mk + +all: ${TARG} + @echo built ${TARG} + +install: ${TARG} + @mkdir -p ${DESTDIR}${PREFIX}/bin + @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ + @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} + @mkdir -p ${DESTDIR}${MANPREFIX}/man1 + @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 + @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} + +uninstall: + rm -f ${DESTDIR}${PREFIX}/bin/${TARG} + rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} + +.c.o: + @echo CC $*.c + @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c + +clean: + rm -f ${OFILES} ${TARG} + +${TARG}: ${OFILES} + @echo LD ${TARG} + @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 diff --git a/tee/Makefile b/tee/Makefile @@ -1,36 +1,6 @@ # tee - tee unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = tee -OFILES = tee.o - -MANFILES = tee.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/test/Makefile b/test/Makefile @@ -1,36 +1,6 @@ # test - test unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = test -OFILES = test.o - -MANFILES = test.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/touch/Makefile b/touch/Makefile @@ -1,36 +1,6 @@ # touch - touch unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = touch -OFILES = touch.o - -MANFILES = touch.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/tr/Makefile b/tr/Makefile @@ -1,36 +1,6 @@ # tr - tr unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = tr -OFILES = tr.o - -MANFILES = tr.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/uniq/Makefile b/uniq/Makefile @@ -1,36 +1,6 @@ # uniq - uniq unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = uniq -OFILES = uniq.o - -MANFILES = uniq.1 - -all: ${TARG} - @echo built ${TARG} - -install: ${TARG} - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ - @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 - @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} - -uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${TARG} - rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 +include ../std.mk diff --git a/yacc/9yacc b/yacc/9yacc diff --git a/yacc/Makefile b/yacc/Makefile @@ -1,27 +1,6 @@ # yacc - yacc unix port from plan9 # Depends on ../lib9 -include ../config.mk - TARG = yacc -OFILES = yacc.o - -MANFILES = yacc.1 - -all: ${TARG} - -.c.o: - @echo CC $*.c - @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c - -clean: - @rm -f ${OFILES} ${TARG} - -${TARG}: ${OFILES} - @echo LD ${TARG} - @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 - -install: - -uninstall: +include ../std.mk diff --git a/yacc/yacc b/yacc/yacc Binary files differ. diff --git a/yacc/yacc.o b/yacc/yacc.o Binary files differ.