home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / relay / makefile < prev    next >
Makefile  |  1989-06-27  |  5KB  |  136 lines

  1. # makefile for C news relaynews
  2.  
  3. # =()<NEWSARTS = @<NEWSARTS>@>()=
  4. NEWSARTS = /usr/spool/news
  5. # =()<NEWSBIN = @<NEWSBIN>@>()=
  6. NEWSBIN = /usr/lib/newsbin
  7. # =()<NEWSCTL = @<NEWSCTL>@>()=
  8. NEWSCTL = /usr/lib/news
  9. # workaround for System V make bug
  10. SHELL = /bin/sh
  11.  
  12. BIN=/bin
  13. NPROC=2
  14. # -DVOID=int for libc.h & old lint libraries
  15. DEFINES= -I../include -I. -DVOID=int -DFLUSHEVERY=6
  16. #CC=CC +V
  17. #CC=gcc -ansi -pedantic -Wall -S
  18. #CC=redcc
  19. COPTS= -O # -pg -g
  20. CFLAGS=$(DEFINES) $(COPTS)
  21. DBM = -ldbm
  22. LIBS= $(DBM)
  23. LINT=lint
  24. LINTFLAGS=-haz $(DEFINES)
  25. LLIBS=-llocal
  26. # I wish I could make lint shut the fk up about some things.  Grrr!
  27. LINTFILT=egrep -v '(possible pointer|long assign|can.t take|never used|nnfree|g
  28. tdate|:$$)'
  29. PROPTS=
  30. P=stpr
  31. PP=pp -Tpsc -fR # lazywriter
  32. PPBACK=dps | stps # lazywriter
  33.  
  34. LIBOBJS=../libcnews.a
  35. SRC=relaynews.c active.c article.c caches.c mkdirs.c control.c fileart.c \
  36.     hdrdefs.c hdrcommon.c hdrparse.c hdrmunge.c \
  37.     history.c io.c msgs.c procart.c \
  38.     sys.c transmit.c trbatch.c ihave.c $(LIBSRCS)
  39. OBJ=relaynews.o active.o article.o caches.o mkdirs.o control.o fileart.o \
  40.     hdrdefs.o hdrcommon.o hdrparse.o hdrmunge.o \
  41.     history.o io.o msgs.o procart.o \
  42.     sys.o transmit.o trbatch.o ihave.o $(LIBOBJS)
  43. FILES=$(NONCFILES) $(CFILES)
  44. NONCFILES= TODO* README ads/README ads/[0-9]* \
  45.     sh/inews sh/tear sh/anne.jones sh/defhdrs.awk \
  46.     sh/realrnews sh/serverrnews makefile
  47. CFILES= ../include/*.h \
  48.     active.h article.h caches.h mkdirs.h control.h cpu.h fileart.h \
  49.     hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  50.  
  51. all: makefile relaynews
  52.  
  53. mkfile: makefile
  54.     sed '/mkfile/d' makefile | mkconv | sed 's/make/mk/g' >$@
  55.  
  56. relaynews: $(OBJ)
  57.     $(CC) $(CFLAGS) $(OBJ) $(LIBS) $(LIBOBJS) -o $@
  58. lint: $(SRC)
  59.     $(LINT) $(LINTFLAGS) $(SRC) $(LLIBS) | $(LINTFILT)
  60. lint-p: $(SRC)
  61.     $(LINT) $(LINTFLAGS) -p $(SRC) $(LLIBS) | $(LINTFILT)
  62.  
  63. newsinstall:
  64.     : nothing
  65.  
  66. # bininstall: make directories, install programs
  67. bininstall: install
  68. install: $(NEWSBIN)/relay/relaynews
  69. $(NEWSBIN)/relay/relaynews: relaynews
  70.     -mkdir $(NEWSBIN)/relay $(NEWSBIN)/inject $(NEWSBIN)/ctl
  71.     cp relaynews $(NEWSBIN)/relay
  72.     : needs to be news-owned, setuid -- build looks after that
  73.     chmod +x sh/* aux/* ctl/*
  74.     cp sh/* $(NEWSBIN)/inject
  75.     cp ctl/* $(NEWSBIN)/ctl
  76.     cp aux/* $(NEWSBIN)/relay
  77.     cp sh/postnews sh/inews $(BIN)
  78.  
  79. TODO.grep: TODO
  80.     -egrep TODO ../include/*.h *.h *.c sh/* | tr -s " \11" " " >$@
  81.     -egrep TODO ../lib*/*.[ch] | tr -s " \11" " " >>$@
  82.  
  83. v7 v8 v9 usg bsd42:
  84.     test -d libos && exit 1
  85.     mv lib$@ libos # or ln -s lib$@ libos
  86.     make
  87.  
  88. print: printc printnonc
  89.     touch $@
  90. printc: $(CFILES)
  91.     $(PP) $? | $(PPBACK)
  92.     touch $@
  93. printnonc: $(NONCFILES)
  94.     pr $(PROPTS) $? | $P
  95.     touch $@
  96. distr: $(FILES)
  97.     (echo relaynews update of `date`; echo ""; bundle $?) | /bin/mail cnews-update
  98.  
  99.     touch $@
  100. clean:
  101.     rm -f core a.out relaynews *.o
  102.     
  103. # header dependencies follow
  104. active.o: ../include/libc.h ../include/news.h ../include/config.h
  105. active.o: active.h
  106. article.o: ../include/news.h article.h headers.h
  107. caches.o: ../include/news.h active.h caches.h transmit.h
  108. mkdirs.o: ../include/libc.h ../include/news.h
  109. control.o: ../include/libc.h ../include/news.h ../include/config.h
  110. control.o: headers.h article.h caches.h history.h
  111. fileart.o: ../include/libc.h ../include/news.h ../include/config.h
  112. fileart.o: active.h mkdirs.h headers.h article.h history.h system.h
  113. hdrcommon.o: ../include/news.h headers.h hdrint.h
  114. hdrdefs.o: ../include/news.h headers.h hdrint.h
  115. hdrmunge.o: ../include/libc.h ../include/news.h fileart.h headers.h
  116. hdrmunge.o: article.h hdrint.h
  117. hdrparse.o: ../include/libc.h ../include/news.h headers.h hdrint.h
  118. history.o: ../include/libc.h ../include/news.h ../include/config.h
  119. history.o: ../include/fgetmfs.h headers.h article.h history.h
  120. hostname.o: ../include/news.h ../include/config.h
  121. ihave.o: ../include/libc.h ../include/news.h ../include/config.h
  122. ihave.o: headers.h article.h caches.h history.h
  123. io.o: ../include/news.h headers.h article.h
  124. msgs.o: ../include/news.h headers.h article.h
  125. procart.o: ../include/libc.h ../include/news.h active.h control.h
  126. procart.o: headers.h article.h history.h system.h
  127. relaynews.o: ../include/libc.h ../include/news.h ../include/config.h
  128. relaynews.o: ../include/fgetmfs.h active.h caches.h cpu.h headers.h
  129. relaynews.o: history.h
  130. string.o: ../include/libc.h ../include/news.h
  131. sys.o: ../include/libc.h ../include/fgetmfs.h ../include/news.h
  132. sys.o: ../include/config.h system.h
  133. transmit.o: ../include/libc.h ../include/news.h ../include/config.h
  134. transmit.o: headers.h active.h article.h system.h trbatch.h transmit.h
  135. trbatch.o: ../include/libc.h ../include/news.h trbatch.h
  136.