#!/bin/make
# @(#) $Id: Makefile,v 1.18 1996/06/20 01:43:01 news Exp $
#
# actsync - makefile for actsync
#
# This make assumes that the inn lib is located in ../libinn.a,
# the inn include is located in ../include and the inn putman.sh
# script is in ../doc

SHELL=/bin/sh
CFLAGS= -I. -I../include -O
LDFLAGS= -O
LIBNEWS= ../libinn.a
CC= cc

##  =()<OWNERS	= -o @<NEWSUSER>@ -g @<NEWSGROUP>@>()=
OWNERS	= -o news -g news
##  =()<NEWSBIN	= @<_PATH_NEWSBIN>@>()=
NEWSBIN	= /usr/local/news/bin
##  =()<NEWSLIB	= @<_PATH_NEWSLIB>@>()=
NEWSLIB	= /usr/local/news/lib
#### =()<MAN8 = @<MAN8>@>()=
MAN8 = /usr/catman/local/cat8
##  =()<MANPAGESTYLE	= @<MANPAGESTYLE>@>()=
MANPAGESTYLE	= NROFF-PACK
MANFLAGS = ${OWNERS} -m 0444

NEWSBIN_0550= actsync actsyncd actmerge
NEWSLIB_CFG= actsync.clari.cfg actsync.clari.ign \
	actsync.uuet.cfg actsync.uunet.ign
RMTARGETS= ${NEWSBIN_0550}
TARGETS= ${RMTARGETS} ${NEWSLIB_CFG}

all: ${TARGETS}

actsync: actsync.o ${LIBNEWS}
	${CC} -o $@ actsync.o ${LIBNEWS} ${LDFLAGS}

actsyncd: actsyncd.sh
	rm -f $@
	cp $? $@
	chmod +x $@

actmerge: actmerge.sh
	rm -f $@
	cp $? $@
	chmod +x $@

clean:
	rm -f *.o

clobber: clean
	rm -f ${RMTARGETS}

install: ${NEWSBIN_0550} ${NEWSLIB_CFG}
	@for I in ${NEWSBIN_0550} ; do \
	    echo ../installit.sh $(OWNERS) -m 0500 -b .OLD $$I ${NEWSBIN}; \
	    sh   ../installit.sh $(OWNERS) -m 0500 -b .OLD $$I ${NEWSBIN}; \
	done
	@for I in ${NEWSLIB_CFG} ; do \
	    echo ../installit.sh $(OWNERS) -m 0444 -b .OLD $$I ${NEWSLIB} ; \
	    sh   ../installit.sh $(OWNERS) -m 0444 -b .OLD $$I ${NEWSLIB} ; \
	done
	fi
	$(SHELL) ../doc/putman.sh $(MANPAGESTYLE) "$(MANFLAGS)" actsync.8 $(MAN8)/actsync.8
