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

install:	installdata

all install:	flyhelp.h


#
# We use ${GEOM}/.. below because it's relative to the "data"
# subdirectory of this directory.
#
installdata:
	case ${INSTALL} in ..*) install=../${INSTALL} ;; *) install=${INSTALL} ;; esac; \
	cd data; \
	  $$install -O -v -m 664 -F ${GEOM}/../data/geom \
		 flythrough_diagram.gv dodec.vect ; \
	  $$install -O -v -m 664 -F ${GEOM}/../data/groups *.?.gv *.tlist


SED = 	sed \
		-e 's/\\/\\\\/g'		\
		-e 's/"/\\"/g'			\
		-e '1s/^\(.*\)$$/"\1/' 		\
		-e 's/^\(.*\)$$/\1\\n\\/'	\
		-e '$$s/^\(.*\)/\1n"/'

flyhelp.h:	flyhelp
	/bin/rm -f $@
	( echo '/*' ; \
	  echo ' * flyhelp.h: generated automatically from file "flyhelp"' ; \
	  echo ' *' ; \
	  echo ' *  to modify, edit "flyhelp" and type "make flyhelp.h"' ; \
	  echo ' */' ; \
	  ${SED} < flyhelp ) > $@
