X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/2958d0fea855a19268cd8f2a0d1a14487b8793ad..fd5d8f6cbc62d1beeb1eadfb745ba43899e64d67:/usr/src/usr.bin/diction/Makefile diff --git a/usr/src/usr.bin/diction/Makefile b/usr/src/usr.bin/diction/Makefile index fd9789ddb3..e198c0a7ad 100644 --- a/usr/src/usr.bin/diction/Makefile +++ b/usr/src/usr.bin/diction/Makefile @@ -1,68 +1,72 @@ # -# @(#)Makefile 4.1 (Berkeley) 82/11/06 +# Copyright (c) 1987 The Regents of the University of California. +# All rights reserved. # -# make file for STYLE and DICTION +# Redistribution and use in source and binary forms are permitted +# provided that the above copyright notice and this paragraph are +# duplicated in all such forms and that any documentation, +# advertising materials, and other materials related to such +# distribution and use acknowledge that the software was developed +# by the University of California, Berkeley. The name of the +# University may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# BIN is the directory for storing the object code -# for the 3 programs that make up style -# DICT is the full pathname of the file dict.d, the -# dictionary file used by DICTION +# @(#)Makefile 4.8 (Berkeley) %G% # -BIN = ${DESTDIR}/usr/lib -DICT= -DDICT=\"/usr/lib/dict.d\" +CFLAGS= -O +LIBC= /lib/libc.a +SRCS= diction.c nwords.c end.c part.c pscan.c outp.c +OBJS= nwords.o end.o part.o pscan.o outp.o +MAN= diction.0 style.0 -all: diction style explain deroff -style: style1 style2 style3 +all: dprog style1 style2 style3 -install: style diction - install -s style1 ${DESTDIR}/usr/lib - install -s style2 ${DESTDIR}/usr/lib - install -s style3 ${DESTDIR}/usr/lib - install -s dprog ${DESTDIR}/usr/lib - install -s deroff ${DESTDIR}/usr/lib - rm -f ${DESTDIR}/usr/bin/deroff - ln ${DESTDIR}/usr/lib/deroff ${DESTDIR}/usr/bin/deroff - install -c style ${DESTDIR}/usr/bin - install -c diction ${DESTDIR}/usr/bin - install -c explain ${DESTDIR}/usr/bin - install -c dict.d ${DESTDIR}/usr/lib - install -c explain.d ${DESTDIR}/usr/lib +dprog: diction.c ${LIBC} + ${CC} ${CFLAGS} -DDICT=\"/usr/lib/dict.d\" diction.c -o $@ + +style1: nwords.o ${LIBC} + ${CC} nwords.o -o $@ -ll + +style2: end.o ${LIBC} + ${CC} end.o -o $@ -ll + +style3: part.o pscan.o outp.o ${LIBC} + ${CC} part.o pscan.o outp.o -o $@ -ll clean: - rm -f prtlex.c wdslex.c endlex.c - rm -f *.o style1 style2 style3 dprog + rm -f ${OBJS} part.c nwords.c end.c style1 style2 style3 dprog -style3: prtlex.o pscan.o outp.o - cc prtlex.o pscan.o outp.o -ll -o style3 -prtlex.c: part.l - lex part.l - mv lex.yy.c prtlex.c -prtlex.o: names.h prtlex.c - cc -c -O prtlex.c -pscan.o: names.h conp.h - cc -c -O pscan.c -outp.o: names.h conp.h style.h - cc -c -O outp.c +cleandir: clean + rm -f ${MAN} tags .depend -style1: wdslex.o - cc wdslex.o -ll -o style1 -wdslex.o: wdslex.c nhash.c dict.c ydict.c names.h - cc -c wdslex.c -wdslex.c: nwords.l - lex nwords.l - mv lex.yy.c wdslex.c +depend: ${SRCS} FRC + mkdep ${CFLAGS} ${SRCS} -style2: endlex.o - cc endlex.o -ll -o style2 -endlex.o: names.h endlex.c ehash.c edict.c - cc -c endlex.c -endlex.c: end.l - lex end.l - mv lex.yy.c endlex.c +install: ${MAN} + install -s -o bin -g bin -m 755 style1 ${DESTDIR}/usr/lib + install -s -o bin -g bin -m 755 style2 ${DESTDIR}/usr/lib + install -s -o bin -g bin -m 755 style3 ${DESTDIR}/usr/lib + install -s -o bin -g bin -m 755 dprog ${DESTDIR}/usr/lib + install -c -o bin -g bin -m 755 style.sh ${DESTDIR}/usr/bin/style + install -c -o bin -g bin -m 755 diction.sh ${DESTDIR}/usr/bin/diction + install -c -o bin -g bin -m 755 explain.sh ${DESTDIR}/usr/bin/explain + install -c -o bin -g bin -m 755 dict.d ${DESTDIR}/usr/lib + install -c -o bin -g bin -m 755 explain.d ${DESTDIR}/usr/lib + install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 + rm -f ${DESTDIR}/usr/man/cat1/explain.0 + ln ${DESTDIR}/usr/man/cat1/diction.0 ${DESTDIR}/usr/man/cat1/explain.0 +# ln ${DESTDIR}/usr/bin/explain ${DESTDIR}/usr/bin/suggest -diction: dprog -dprog: diction.c - cc -O $(DICT) diction.c -i -o dprog +lint: ${SRCS} + lint ${CFLAGS} nwords.c + lint ${CFLAGS} end.c + lint ${CFLAGS} part.c pscan.c outp.c -deroff: deroff.c - cc -O deroff.c -i -o deroff +tags: ${SRCS} + ctags nwords.c + ctags -a end.c + ctags -a part.c pscan.c outp.c + sort -o tags tags