VPATH=@srcdir@
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
datadir=@datadir@
includedir=@includedir@
infodir=@infodir@
libdir=@libdir@
libexecdir=@libexecdir@
localstatedir=@localstatedir@
mandir=@mandir@
sbindir=@sbindir@
sharedstatedir=@sharedstatedir@
sysconfdir=@sysconfdir@
SHELL=	 /bin/sh
COMPILE_ET=../utils/et/compile_et

GEN_H=	discuss_err.h rpc_et.h ss_err.h usp_et.h

FILES=	ansi.h atom.h globals.h internal.h mit-copyright.h rpc.h ss.h trn_spec.h

all:	$(GEN_H)
	cd discuss;	$(MAKE) $(MFLAGS) all

discuss_err.h:	$(srcdir)/../ets/discuss_err.et
	$(COMPILE_ET) $(srcdir)/../ets/discuss_err.et; rm discuss_err.c

rpc_et.h:	$(srcdir)/../ets/rpc_et.et
	$(COMPILE_ET) $(srcdir)/../ets/rpc_et.et; rm rpc_et.c

ss_err.h:	$(srcdir)/../ets/ss_err.et
	$(COMPILE_ET) $(srcdir)/../ets/ss_err.et; rm ss_err.c

usp_et.h:	$(srcdir)/../ets/usp_et.et
	$(COMPILE_ET) $(srcdir)/../ets/usp_et.et; rm usp_et.c


clean:
	rm -rf *~
	cd discuss	; $(MAKE) $(MFLAGS) clean

dist:	$(FILES) $(GEN_H) config.h.in
	-mkdir ../../dist/source/include
	tar cfr - config.h.in Makefile.in $(FILES) $(GEN_H) | \
		(cd ../../dist/source/include;tar xfp -)
