
#
# Makefile for NNTP intstallation
#

DISTFILES = Makefile README CHANGES rrnpatches

DISTDIRS = common doc inews server support xfer xmit

DIST = $(DISTFILES) $(DISTDIRS)


all: make_server make_client

make_server: /nowhere
	cd server; make
	cd support; make
#	cd doc; make
	cd xmit; make

server: make_server

make_client: /nowhere
	cd inews; make
#	cd doc; make

client: make_client

install: install_server install_client

install_:
	@ echo "If you want to install a server version or"
	@ echo "a client version, type \"make install_server\""
	@ echo "or \"make install_client\" respectively."
	@ echo "See README for more details."

install_server:
	cd server; make install ROOT=$(ROOT)
	cd support; make install ROOT=$(ROOT)
#	cd doc; make install ROOT=$(ROOT)

install_client:
	cd inews; make install ROOT=$(ROOT)
	cd xmit; make install ROOT=$(ROOT)
#	cd doc; make install ROOT=$(ROOT)

clean:
	for i in $(DISTDIRS); do cd $$i; make clean; cd ..; done

clobber: clean

check:
	for i in $(DISTDIRS); do cd $$i; make check; cd ..; done

distrib: check
	mkdir ../nntp.dist
	cp -rp $(DIST) ../nntp.dist
	cd ../nntp.dist; for i in $(DISTDIRS); do cd $$i; make distrib; cd ..; done

rpt: /nowhere
	tar cf rrnpatches.tar rrnpatches; compress rrnpatches.tar

server: /nowhere
client: /nowhere

/nowhere: ;
