GEOM = ..
include ${GEOM}/makefiles/Makedefs.global
include Makedefs
include ${GEOM}/makefiles/Makerules.src

update:	warning oogl.5 OOGL.m.doc INSTALL.next INSTALL.sgi INSTALL.src

warning:
	@echo '' ; \
	 echo 'Warning: "make update" uses the existing Info files' ; \
	 echo '  to update the documents.  To generate new Info files' ; \
	 echo '  from geomview.tex, type "make info".' ; \
	 echo ''

oogl.5:	_always
	manext 'OOGL File Formats' 'Customization' | \
	  manify OOGL 'File formats for OOGL geometric objects' > oogl.5

OOGL.m.doc:	_always
	( ${MAKE} header_message ; \
	  manext 'Mathematica' 'Installation' ; \
	  ) > OOGL.m.doc

INSTALL.next:	_always
	( ${MAKE} header_message ; \
	  manext 'NeXT Binary Installation' 'Source Code Installation' ;\
	  manext 'SGI Binary Detail' 'NeXT Binary Installation'; \
	  ) > INSTALL.next

INSTALL.sgi:	_always
	( ${MAKE} header_message ; \
	  manext 'SGI Binary Installation' 'NeXT Binary Installation';\
	  ) > INSTALL.sgi

INSTALL.src:	_always
	( ${MAKE} header_message ; \
	  manext 'Source Code Installation' 'Obtaining' ;\
	  ) > INSTALL.src

header_message:
	@echo '' ;
	@echo 'NOTE: This file is autogenerated from the Geomview manual.';
	@echo '  For references to things not in this file, see the manual.';
	@echo '  The manual is distributed in the "doc" subdirectory.';
	@echo '';

info:	_always
	nodeupdater geomview.tex geomview.tex.new
	/bin/mv geomview.tex.new geomview.tex
	emacs -batch geomview.tex -l makeinfo.el -kill

_always:

# temporary target for copying into the distribution directories:

SGIDIR=/u/work/mbp/geomview-sgi
NEXTDIR=/u/work/mbp/geomview-next

BINDISTFILES=geomview geomview-* geomview.ps OOGL.m.doc example[123].c

dist:
	/bin/cp ${BINDISTFILES} ${SGIDIR}/Geomview/doc
	/bin/cp ${BINDISTFILES} ${NEXTDIR}/Geomview.app/doc
	/bin/cp INSTALL.src ${GEOM}
	/bin/cp INSTALL.sgi ${SGIDIR}/Geomview/INSTALL
	/bin/cp INSTALL.next ${NEXTDIR}/INSTALL
	/bin/cp INSTALL.next ${NEXTDIR}/Geomview.app/INSTALL
