home *** CD-ROM | disk | FTP | other *** search
Makefile | 1990-01-04 | 3.2 KB | 125 lines |
- #
- # Makefile for the pexpire program
- #
- # by Dave Taylor, Hewlett-Packard Co.
- # Cnews modifications by Jim Pickering (jrp@rducky)
-
- SHELL = /bin/sh
- CFILES = pexpire.c
- HEADERS = pexpire.h
- OBJS = pexpire.o
-
- # our executable ... if you change this, you'll have to edit dopexpire (Cnews)
- PROGNAME = pexpire
-
- # our doexpire(8) replacement for Cnews
- BATCHNAME= dopexpire
-
- # Bnews man directory
- MANDIR = /usr/man/local/man1
- # Cnews man directory
- MANDIR = /usr/man/local/man8
-
- # Bnews install directory
- NEWSDIR = /usr/lib/news
- # Cnews install directory ... if you change this, you'll have to edit dopexpire
- NEWSDIR = /usr/lib/newsbin/expire
-
- # Cnews pexplist install directory ... if you change this, you'll have to edit
- # dopexpire
- LISTDIR = /usr/lib/news
-
- # the next is probably the only thing you'll need to locally customize
- # to reflect the top level location of the netnews source on your
- # machine ... Bnews
-
- NEWS_SRC = /usr/local/src/news.2.11
-
- INCLUDEDIR = -I${NEWS_SRC}
- LIBS = -lPW
- RM = rm -f
-
- # use for BNEWS
- CFLAGS = -O ${INCLUDEDIR}
- # use for CNEWS
- CFLAGS = -O -DCNEWS
-
- # your favorite C compiler
- CC = /bin/cc
- CC = /bin/ccc
-
- ${PROGNAME}: ${OBJS}
- ${CC} -o ${PROGNAME} -s ${OBJS} ${LIBS}
-
- pexpire.c: pexpire.h
- pexpire.o: pexpire.c
-
- clean:
- ${RM} ${OBJS} LINT.OUT core $(PROGNAME) tempxxx
-
- lint: LINT.OUT
-
- LINT.OUT: ${CFILES}
- lint ${DEFINE} ${INCLUDEDIR} ${CFILES} ${LIBS} > LINT.OUT
-
- shar:
- ${RM} Part* MANIFEST
- makekit -oMANIFEST Makefile README* cpexpire.1 bpexpire.1 pexpire.c pexpire.defs pexpire.h pexpire.batch dopexpire pexplist
- compress Part*
-
- realclean: shar clean
- ${RM} MANIFEST Makefile README* cpexpire.1 bpexpire.1 pexpire.c pexpire.defs pexpire.h pexpire.batch dopexpire pexplist
-
- bnewsinstall: $(PROGNAME)
- mv $(PROGNAME) $(NEWSDIR)
- chmod 0750 $(NEWSDIR)/$(PROGNAME)
- chown news $(NEWSDIR)/$(PROGNAME)
- chgrp news $(NEWSDIR)/$(PROGNAME)
- cp pexpire.defs $(NEWSDIR)
- chown news $(NEWSDIR)/pexpire.defs
- chgrp news $(NEWSDIR)/pexpire.defs
- cp bpexpire.1 $(MANDIR)/pexpire.1
- chown bin $(MANDIR)/pexpire.1
- chgrp bin $(MANDIR)/pexpire.1
- chmod 0444 $(MANDIR)/pexpire.1
- @echo
- @echo "\tInstall pexpire.batch and"
- @echo "\t\tput an entry for $(PROGNAME) in /usr/lib/crontab"
- @echo
-
- bnewsuninstall:
- ${RM} $(NEWSDIR)/$(PROGNAME)
- ${RM} $(NEWSDIR)/pexpire.defs
- ${RM} $(MANDIR)/pexpire.1
-
- cnewsinstall: $(PROGNAME) $(BATCHNAME)
- mv $(PROGNAME) $(NEWSDIR)
- chmod 0775 $(NEWSDIR)/$(PROGNAME)
- chown bin $(NEWSDIR)/$(PROGNAME)
- chgrp bin $(NEWSDIR)/$(PROGNAME)
- cp $(BATCHNAME) $(NEWSDIR)
- chmod 0775 $(NEWSDIR)/$(BATCHNAME)
- chown bin $(NEWSDIR)/$(BATCHNAME)
- chgrp bin $(NEWSDIR)/$(BATCHNAME)
- cp pexplist $(LISTDIR)/pexplist
- chown bin $(LISTDIR)/pexplist
- chgrp bin $(LISTDIR)/pexplist
- chmod 0444 $(LISTDIR)/pexplist
- cp cpexpire.1 $(MANDIR)/pexpire.8
- chown bin $(MANDIR)/pexpire.8
- chgrp bin $(MANDIR)/pexpire.8
- chmod 0444 $(MANDIR)/pexpire.8
- ${RM} $(MANDIR)/dopexpire.8
- ln $(MANDIR)/pexpire.8 $(MANDIR)/dopexpire.8
- @echo
- @echo "Put a similar entry for $(BATCHNAME) in /usr/lib/crontab:"
- @echo "\t44 0 * * * /bin/su news -c '/usr/lib/newsbin/expire/dopexpire'"
- @echo
-
- cnewsuninstall:
- ${RM} $(NEWSDIR)/$(PROGNAME)
- ${RM} $(NEWSDIR)/$(BATCHNAME)
- ${RM} $(LISTDIR)/pexplist
- ${RM} $(MANDIR)/pexpire.8
- ${RM} $(MANDIR)/dopexpire.8
-