SHELL=	/bin/sh
CC=	@CC@
INSTALL=@INSTALL@
YACC=	@YACC@

DEFS=	@DEFS@
LIBS=	@LIBS@

KLIBS=	@KLIBS@
ETLIB=	../et/libcom_err.a
SSLIB=	../ss/libss.a

INFOS=  access.info add_meeting.info announce_meeting.info \
	check_meetings.info del_mtg.info delete.info delete_acl.info \
	goto.info help.info list.info list_acl.info list_meetings.info \
	next_meeting.info print.info quit.info reply.info retrieve.info \
	rn.info set.info set_acl.info status.info switch_off.info \
	switch_on.info talk.info transaction_specifiers.info write.info

# defaults for options that should come from above.
DESTDIR= /usr/local

INFODIR= /usr/lib/discuss/info

.SUFFIXES:	.h

all:	

install: all
	install -c discuss $(DESTDIR)/discuss
	rm -rf $(INFODIR)
	mkdir $(INFODIR)
	cp $(INFOS) $(INFODIR)/
	ln -s $(INFODIR)/add_meeting.info $(INFODIR)/add_mtg.info
	ln -s $(INFODIR)/add_meeting.info $(INFODIR)/am.info
	ln -s $(INFODIR)/announce_meeting.info $(INFODIR)/anm.info
	ln -s $(INFODIR)/announce_meeting.info $(INFODIR)/ann_mtg.info
	ln -s $(INFODIR)/check_meetings.info $(INFODIR)/ckm.info
	ln -s $(INFODIR)/delete.info $(INFODIR)/d.info
	ln -s $(INFODIR)/delete_acl.info $(INFODIR)/da.info
	ln -s $(INFODIR)/delete.info $(INFODIR)/dl.info
	ln -s $(INFODIR)/talk.info $(INFODIR)/enter.info
	ln -s $(INFODIR)/quit.info $(INFODIR)/exit.info
	ln -s $(INFODIR)/goto.info $(INFODIR)/g.info
	ln -s $(INFODIR)/goto.info $(INFODIR)/go.info
	ln -s $(INFODIR)/list_acl.info $(INFODIR)/la.info
	ln -s $(INFODIR)/list.info $(INFODIR)/ls.info
	ln -s $(INFODIR)/list_meetings.info $(INFODIR)/lsm.info
	ln -s $(INFODIR)/print.info $(INFODIR)/next.info
	ln -s $(INFODIR)/next_meeting.info $(INFODIR)/nm.info
	ln -s $(INFODIR)/print.info $(INFODIR)/nref.info
	ln -s $(INFODIR)/print.info $(INFODIR)/p.info
	ln -s $(INFODIR)/print.info $(INFODIR)/pr.info
	ln -s $(INFODIR)/print.info $(INFODIR)/pref.info
	ln -s $(INFODIR)/print.info $(INFODIR)/prev.info
	ln -s $(INFODIR)/quit.info $(INFODIR)/q.info
	ln -s $(INFODIR)/rn.info $(INFODIR)/read_new.info
	ln -s $(INFODIR)/reply.info $(INFODIR)/rp.info
	ln -s $(INFODIR)/set_acl.info $(INFODIR)/sa.info
	ln -s $(INFODIR)/talk.info $(INFODIR)/send.info
	ln -s $(INFODIR)/specifiers.info $(INFODIR)/spec.info
	ln -s $(INFODIR)/transaction_specifiers.info $(INFODIR)/specifiers.info
	ln -s $(INFODIR)/switch_off.info $(INFODIR)/swf.info
	ln -s $(INFODIR)/switch_on.info $(INFODIR)/swn.info
	ln -s $(INFODIR)/write.info $(INFODIR)/w.info

clean:
	rm -f *.o *~ \#* *.bak
	rm -f discuss trn_expr.c y.tab.c TAGS info.tar

dist:	$(INFOS) Makefile.in
	-mkdir ../../../dist/source/client/info
	cp -p $(INFOS) ../../../dist/source/client/info/
	cp -p Makefile.in ../../../dist/source/client/info/
