xref: /original-bsd/contrib/bib/src/Makefile (revision 57feb3a1)
1#	@(#)Makefile	2.4	09/23/83
2#
3CC = cc
4.c.o:
5	$(CC) -c $*.c
6
7INVo        = invert.o streams.o  makekey.o
8INVc        = invert.c streams.c  makekey.c
9LOOKo       = lookup.o locate.o alpha.seek.o streams.o makekey.o
10LOOKc       = lookup.c locate.c alpha.seek.c streams.c makekey.c
11NEWBIBo     = newbib.o newbibargs.o locate.o alpha.seek.o streams.o makekey.o
12BIBo        = bib.o bibargs.o locate.o alpha.seek.o streams.o makekey.o
13BIBc        = bib.c bibargs.c locate.c alpha.seek.c streams.c makekey.c
14LISTo       = listrefs.o bibargs.o streams.o makekey.o
15NEWLISTo    = listrefs.o newbibargs.o streams.o makekey.o
16LISTc       = listrefs.c bibargs.c streams.c makekey.c
17
18SRCS = \
19	bib.c \
20	bibargs.c \
21	alpha.seek.c \
22	bib.h \
23	invert.c \
24	listrefs.c \
25	locate.c \
26	lookup.c \
27	makekey.c \
28	streams.c \
29	streams.h
30
31all:	invert lookup listrefs bib
32
33install: all
34	install -s -c invert $(DESTDIR)/usr/new/invert
35	install -s -c lookup $(DESTDIR)/usr/new/lookup
36	install -s -c listrefs $(DESTDIR)/usr/new/listrefs
37	install -s -c bib $(DESTDIR)/usr/new/bib
38
39invert:  $(INVo)
40	$(CC)   $(INVo)   -o invert
41
42invert.lint:  $(INVc) bib.h streams.h
43	lint  $(INVc) >invert.lint
44
45lookup: $(LOOKo)
46	$(CC)   $(LOOKo)  -o lookup
47
48lookup.lint: $(LOOKc) bib.h streams.h
49	lint $(LOOKc) >lookup.lint
50
51bib: $(BIBo)
52	$(CC)   $(BIBo)  -o bib
53
54bib.lint: $(BIBc) bib.h streams.h
55	lint $(BIBc) >bib.lint
56
57listrefs: $(LISTo)
58	$(CC)   $(LISTo)  -o listrefs
59
60newlisttrefs: $(NEWLISTo)
61	$(CC)   $(NEWLISTo)  -o newlistrefs
62
63bib.o:		bib.h
64bibargs.o:	bib.h
65listrefs.o:	bib.h
66invert.o:       streams.h bib.h
67
68locate.o:       streams.h bib.h
69makekey.o:	bib.h
70alpha.seek.o:   streams.h
71streams.o:      streams.h
72
73$(SRCS) :
74	sccs get $@
75
76bibdoc:
77	tbl doc/bibdoc.ms | vtroff -ms
78	vtroff -man doc/invert.man
79	vtroff -man doc/bib.man
80
81doc/INDEX:	doc/testrefs
82	cd doc; invert -p INDEX testrefs
83
84styleman:
85	sed -e 's/STYLE/stdn - standard numeric/' tstyles | bib -tstdn >show.stdn
86	sed -e 's/STYLE/stdsn - standard sorted numeric/' tstyles | bib -tstdsn >show.stdsn
87	sed -e 's/STYLE/stda - standard alphabetic/' tstyles | bib -tstda >show.stda
88	sed -e 's/STYLE/opena - open alphabetic/' tstyles | bib -topena >show.opena
89	sed -e 's/STYLE/openn - open numeric/' tstyles | bib -topenn >show.openn
90	sed -e 's/STYLE/astro - astrophysical journal style/' tstyles | bib -tastro >show.astro
91	sed -e 's/STYLE/hnf - Hanson Normal Form/' tstyles | bib -thnf >show.hnf
92	sed -e 's/STYLE/list - listrefs default/' tstyles | bib -tlist >show.list
93	sed -e 's/STYLE/spe - S P and E Journal style/' tstyles | bib -tspe2 >show.spe
94	sed -e 's/STYLE/supn - superscripted numeric style/' tstyles | bib -tsupn >show.supn
95	sed -e 's/STYLE/foot - footnoted citations/' tstyles | bib -tfoot >show.foot
96	vtroff -ms styletop show.*
97
98clean:
99	-rm -f *.o bib invert listrefs lookup tags
100