home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / rn_4_3_blars.lzh / Makefile.SH < prev    next >
Makefile  |  1990-08-22  |  5KB  |  179 lines

  1. case $CONFIG in
  2.     '') . ./config.sh ;;
  3. esac
  4. echo "Extracting Makefile (with variable substitutions)"
  5. cat >Makefile <<!GROK!THIS!
  6. # $Header: Makefile.SH,v 4.3.2.10 90/05/04 00:44:51 sob Exp $
  7. #
  8. # $Log:    Makefile.SH,v $
  9. # Revision 4.3.2.10  90/05/04  00:44:51  sob
  10. # Added socketlib to list of libs.
  11. # Revision 4.3.2.9  90/04/23  00:27:12  sob
  12. # Added better support for XENIX
  13. # Revision 4.3.2.8  89/12/20  23:20:14  sob
  14. # Added "hp-ux" to the list of files created by Configure.
  15. # Revision 4.3.2.7  89/12/09  01:49:48  sob
  16. # make clean cleans up better.
  17. # Revision 4.3.2.6  89/12/08  22:43:45  sob
  18. # Added suggestions by weening@gang-of-four.stanford.edu and 
  19. # jik@pit-manager.mit.edu. rrn manual page is now created when
  20. # doing an installation. getactive will only be made when rrn is being
  21. # created.
  22. # Revision 4.3.2.5  89/11/08  04:47:38  sob
  23. # Added VOIDSIG handling for SunOS 4.X
  24. # Revision 4.3.2.4  89/11/08  03:16:29  sob
  25. # Added server.h to list of things created by Configure
  26. # Revision 4.3.2.3  89/11/08  01:05:52  sob
  27. # Updated to work with RRN or RN
  28. # Revision 4.3.2.2  89/11/06  00:03:19  sob
  29. # Added RRN support originally distributed with NNTP 1.5
  30. # Revision 4.3.2.1  89/11/05  23:55:09  sob
  31. # RRN support branch
  32. #
  33. # Revision 4.3.1.2  85/05/13  17:21:18  lwall
  34. # System V make needs space before line-continuing backslash.
  35. # Revision 4.3.1.1  85/05/10  11:30:15  lwall
  36. # Branch for patches.
  37. # Revision 4.3  85/05/01  11:33:26  lwall
  38. # Baseline for release with 4.3bsd.
  39.  
  40. CC = $cc
  41. rnbin = $rnbin
  42. rnlib = $rnlib
  43. mansrc = $mansrc
  44. manext = $manext
  45. #NNTPNNTPDIR = $NNTPSRC
  46. #NNTPNNTPINC = $rrninclude
  47. CFLAGS = $iandd -O $include
  48. LDFLAGS = $iandd
  49. NDIRC = $ndirc
  50. NDIRO = $ndiro
  51.  
  52. libs = $ndirlib $termlib $jobslib $socketlib
  53. !GROK!THIS!
  54. cat >>Makefile <<'!NO!SUBS!'
  55. #NNTPnntp=getactive
  56. public = rn newsetup newsgroups Pnews Rnmail
  57. private = norm.saver mbox.saver ng.help art.help pager.help subs.help makedir filexp Pnews.header $(nntp)
  58. manpages = rn.1 Pnews.1 Rnmail.1 newsetup.1 newsgroups.1
  59. util = Makefile makedepend newsnews
  60.  
  61.  
  62. h1 = addng.h art.h artio.h artsrch.h backpage.h bits.h cheat.h common.h
  63. h2 = final.h head.h help.h init.h intrp.h kfile.h last.h ndir.h ng.h
  64. h3 = ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  65. h4 = respond.h rn.h search.h sw.h term.h util.h
  66. #NNTPh5 = server.h
  67.  
  68. h = $(h1) $(h2) $(h3) $(h4) $(h5)
  69.  
  70. c1 = addng.c art.c artio.c artsrch.c backpage.c bits.c cheat.c
  71. c2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c
  72. c3 = ngdata.c ngsrch.c ngstuff.c only.c rcln.c rcstuff.c
  73. c4 = respond.c rn.c search.c sw.c term.c util.c
  74. #NNTPc5 = $(NNTPDIR)/common/clientlib.c
  75.  
  76. c = $(c1) $(c2) $(c3) $(c4) $(c5)
  77.  
  78. obj1 = addng.o art.o artio.o artsrch.o backpage.o bits.o cheat.o
  79. obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  80. obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o
  81. obj4 = respond.o rn.o search.o sw.o term.o util.o
  82. #NNTPobj5 =  $(NNTPDIR)/common/clientlib.o
  83.  
  84. obj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5)
  85.  
  86. lintflags = -phbvxac
  87.  
  88. add1 = Makefile.old Pnews Rnmail art.help
  89. add2 = bsd config.h config.sh eunice filexp
  90. add3 = loc makedepend makedir mbox.saver newsetup
  91. add4 = newsgroups newsnews ng.help norm.saver pager.help
  92. add5 = pdp11 rn subs.help usg v7 ultrix sun hp-ux sgi xenix server.h
  93.  
  94. addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5)
  95.  
  96. # grrr
  97. SHELL = /bin/sh
  98.  
  99. .c.o:
  100.     $(CC) -c $(CFLAGS) $*.c
  101.  
  102. all: $(public) $(private) $(util)
  103.     touch all
  104.  
  105. rn: $(obj)
  106.     $(CC) $(LDFLAGS) $(obj) $(libs) -o rn
  107.  
  108. #NNTPgetactive: getactive.o $(NNTPDIR)/common/clientlib.o
  109. #NNTP    $(CC) $(LDFLAGS) getactive.o $(NNTPDIR)/common/clientlib.o -o getactive $(libs)
  110.  
  111. # Eek! This is gross.
  112. $(NNTPDIR)/common/clientlib.o:
  113.     $(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
  114.     mv clientlib.o $(NNTPDIR)/common/clientlib.o
  115.  
  116. # if a .h file depends on another .h file...
  117. $(h):
  118.     touch $@
  119.  
  120. install: rn
  121. # won't work with csh
  122.     export PATH || exit 1
  123.     - mv $(rnbin)/rn $(rnbin)/rn.old
  124. #NNTP    - ln -s rn $(rnbin)/rrn
  125.     - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  126.     cd $(rnbin); chmod 755 $(public)
  127.     chmod 755 makedir
  128.     - ./makedir `./filexp $(rnlib)`
  129.     - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  130.     cd `./filexp $(rnlib)`; chmod 755 $(private)
  131.     - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi
  132.     - if test `pwd` != $(mansrc); then \
  133. for page in $(manpages); do \
  134. cp $$page $(mansrc)/`basename $$page .1`.$(manext); \
  135. done; \
  136. #NNTPecho ".so man$(manext)/rn.$(manext)" > $(mansrc)/rrn.$(manext) ; \
  137. fi
  138.  
  139. clean:
  140.     rm -f *.o
  141.  
  142. realclean:
  143.     rm -f rn *.o core $(addedbyconf) 
  144. #NNTP    rm -f $(NNTPDIR)/common/clientlib.o getactive
  145.  
  146. # The following lint has practically everything turned on.  Unfortunately,
  147. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  148. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  149. # for that spot.
  150.  
  151. lint:
  152.     lint $(lintflags) $(defs) $(c) > rn.fuzz
  153.  
  154. depend:
  155.     ./makedepend
  156.  
  157. # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  158. $(obj):
  159.     @ echo "You haven't done a "'"make depend" yet!'; exit 1
  160. !NO!SUBS!
  161. case "$isrrn" in
  162. define)  sed < Makefile -e '/^#NNTP/s/^#NNTP//' > Makefile.new ;;
  163. *) sed < Makefile -e '/^#NNTP/d' > Makefile.new ;;
  164. esac
  165. mv Makefile.new Makefile
  166. $eunicefix Makefile
  167.