SHELL=	 /bin/sh

GEN_H=	com_err.h ss.h usp.h ss_err.h usp_et.h discuss_err.h rpc_et.h

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

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

com_err.h: ../et/com_err.h
	cp -p ../et/com_err.h .

ss.h: ../ss/ss.h
	cp -p ../ss/ss.h .

usp.h: ../usp/usp.h
	cp -p ../usp/usp.h .

ss_err.h:	../ss/ss_err.et
	cp -p ../ss/ss_err.h .

usp_et.h:	../usp/usp_et.h
	cp -p ../usp/usp_et.h .

discuss_err.h:	../ets/discuss_err.et
	../et/compile_et ../ets/discuss_err.et; rm discuss_err.c

rpc_et.h:	../ets/rpc_et.et
	../et/compile_et ../ets/rpc_et.et; rm rpc_et.c

clean:
	rm -f ${GEN_H} *~
	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 -)

