home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume9 / cn_pexpire / Makefile < prev    next >
Encoding:
Makefile  |  1990-01-04  |  3.2 KB  |  125 lines

  1. #
  2. #    Makefile for the pexpire program
  3. #      
  4. #  by Dave Taylor, Hewlett-Packard Co.
  5. #  Cnews modifications by Jim Pickering (jrp@rducky)
  6.  
  7. SHELL    =    /bin/sh
  8. CFILES   =    pexpire.c
  9. HEADERS  =    pexpire.h
  10. OBJS     =    pexpire.o
  11.  
  12. # our executable ... if you change this, you'll have to edit dopexpire (Cnews)
  13. PROGNAME =    pexpire
  14.  
  15. # our doexpire(8) replacement for Cnews
  16. BATCHNAME=    dopexpire
  17.  
  18. # Bnews man directory
  19. MANDIR    =    /usr/man/local/man1
  20. # Cnews man directory
  21. MANDIR    =    /usr/man/local/man8
  22.  
  23. # Bnews install directory
  24. NEWSDIR    =    /usr/lib/news
  25. # Cnews install directory ... if you change this, you'll have to edit dopexpire
  26. NEWSDIR    =    /usr/lib/newsbin/expire
  27.  
  28. # Cnews pexplist install directory ... if you change this, you'll have to edit
  29. # dopexpire
  30. LISTDIR    =    /usr/lib/news
  31.  
  32. # the next is probably the only thing you'll need to locally customize
  33. # to reflect the top level location of the netnews source on your 
  34. # machine ... Bnews
  35.  
  36. NEWS_SRC =    /usr/local/src/news.2.11
  37.  
  38. INCLUDEDIR  =   -I${NEWS_SRC}
  39. LIBS     =       -lPW
  40. RM       =    rm -f
  41.  
  42. # use for BNEWS
  43. CFLAGS   =     -O ${INCLUDEDIR}
  44. # use for CNEWS
  45. CFLAGS   =     -O -DCNEWS
  46.  
  47. # your favorite C compiler
  48. CC       =    /bin/cc
  49. CC       =    /bin/ccc
  50.  
  51. ${PROGNAME}: ${OBJS}
  52.     ${CC} -o ${PROGNAME} -s ${OBJS} ${LIBS}
  53.  
  54. pexpire.c: pexpire.h
  55. pexpire.o: pexpire.c
  56.  
  57. clean:
  58.     ${RM} ${OBJS} LINT.OUT core $(PROGNAME) tempxxx
  59.  
  60. lint: LINT.OUT
  61.  
  62. LINT.OUT: ${CFILES}
  63.     lint ${DEFINE} ${INCLUDEDIR} ${CFILES} ${LIBS} > LINT.OUT
  64.  
  65. shar:
  66.     ${RM} Part* MANIFEST
  67.     makekit -oMANIFEST Makefile README* cpexpire.1 bpexpire.1 pexpire.c pexpire.defs pexpire.h pexpire.batch dopexpire pexplist
  68.     compress Part*
  69.  
  70. realclean: shar clean
  71.     ${RM} MANIFEST Makefile README* cpexpire.1 bpexpire.1 pexpire.c pexpire.defs pexpire.h pexpire.batch dopexpire pexplist
  72.  
  73. bnewsinstall: $(PROGNAME)
  74.     mv $(PROGNAME) $(NEWSDIR)
  75.     chmod 0750 $(NEWSDIR)/$(PROGNAME)
  76.     chown news $(NEWSDIR)/$(PROGNAME)
  77.     chgrp news $(NEWSDIR)/$(PROGNAME)
  78.     cp pexpire.defs $(NEWSDIR)
  79.     chown news $(NEWSDIR)/pexpire.defs
  80.     chgrp news $(NEWSDIR)/pexpire.defs
  81.     cp bpexpire.1 $(MANDIR)/pexpire.1
  82.     chown bin $(MANDIR)/pexpire.1
  83.     chgrp bin $(MANDIR)/pexpire.1
  84.     chmod 0444 $(MANDIR)/pexpire.1
  85.     @echo
  86.     @echo "\tInstall pexpire.batch and"
  87.     @echo "\t\tput an entry for $(PROGNAME) in /usr/lib/crontab"
  88.     @echo
  89.  
  90. bnewsuninstall:
  91.     ${RM} $(NEWSDIR)/$(PROGNAME)
  92.     ${RM} $(NEWSDIR)/pexpire.defs
  93.     ${RM} $(MANDIR)/pexpire.1
  94.  
  95. cnewsinstall: $(PROGNAME) $(BATCHNAME)
  96.     mv $(PROGNAME) $(NEWSDIR)
  97.     chmod 0775 $(NEWSDIR)/$(PROGNAME)
  98.     chown bin $(NEWSDIR)/$(PROGNAME)
  99.     chgrp bin $(NEWSDIR)/$(PROGNAME)
  100.     cp $(BATCHNAME) $(NEWSDIR)
  101.     chmod 0775 $(NEWSDIR)/$(BATCHNAME)
  102.     chown bin $(NEWSDIR)/$(BATCHNAME)
  103.     chgrp bin $(NEWSDIR)/$(BATCHNAME)
  104.     cp pexplist $(LISTDIR)/pexplist
  105.     chown bin $(LISTDIR)/pexplist
  106.     chgrp bin $(LISTDIR)/pexplist
  107.     chmod 0444 $(LISTDIR)/pexplist
  108.     cp cpexpire.1 $(MANDIR)/pexpire.8
  109.     chown bin $(MANDIR)/pexpire.8
  110.     chgrp bin $(MANDIR)/pexpire.8
  111.     chmod 0444 $(MANDIR)/pexpire.8
  112.     ${RM} $(MANDIR)/dopexpire.8
  113.     ln $(MANDIR)/pexpire.8 $(MANDIR)/dopexpire.8
  114.     @echo
  115.     @echo "Put a similar entry for $(BATCHNAME) in /usr/lib/crontab:"
  116.     @echo "\t44 0 * * * /bin/su news -c '/usr/lib/newsbin/expire/dopexpire'"
  117.     @echo
  118.  
  119. cnewsuninstall:
  120.     ${RM} $(NEWSDIR)/$(PROGNAME)
  121.     ${RM} $(NEWSDIR)/$(BATCHNAME)
  122.     ${RM} $(LISTDIR)/pexplist
  123.     ${RM} $(MANDIR)/pexpire.8
  124.     ${RM} $(MANDIR)/dopexpire.8
  125.