#	Common definitions for making a book

ROOT	        ?= /
ITOOLROOT       != echo $${ITOOLS_MNT:-$${TOOLROOT:-/}}
TMPDIR		?= /usr/tmp

include ${ROOT}/usr/include/make/commondefs

COMMONBOOKRULES = ${DEPTH}/ismbookrules
COMMONFIGRULES  = ${ROOT}/usr/include/make/commonfigrules
COMMONPREPRULES = ${ROOT}/usr/include/make/commonpreprules

# System tools needed
RM	 	 = /bin/rm
RMDIR            = /bin/rmdir
CP	 	 = /bin/cp
MV	 	 = /bin/mv
LS	 	 = /bin/ls
AWK		 = /usr/bin/awk
EGREP		 = /usr/bin/egrep

# Our local tools needed
INDEXGEN	 = ${ITOOLROOT}/usr/share/Insight/bin/indexGen
MAKEBW           = ${ITOOLROOT}/usr/share/Insight/bin/makebw
GLOSSQA          = ${ITOOLROOT}/usr/share/Insight/bin/glossQA
SGIBOOK_QA	 = ${ITOOLROOT}/usr/share/Insight/bin/sgibook_qa
PS2GIF           = ${ITOOLROOT}/usr/share/Insight/bin/ps2gif
TOGIF            = ${ITOOLROOT}/usr/share/Insight/bin/togif
XREF		 = ${ITOOLROOT}/usr/share/Insight/bin/xref
COPY_SGIDOC_FIGS = ${ITOOLROOT}/usr/share/Insight/bin/valid_sgidoc_figs
COPY_HELPMAPS	 = ${ITOOLROOT}/usr/share/Insight/bin/valid_helpmaps
CLEAN_CGMS	 = ${ITOOLROOT}/usr/share/Insight/bin/clean_cgms
MIF2SGML	 = ${ITOOLROOT}/usr/share/Insight/bin/mif2sgml
TIFFTOPNM	 = ${ITOOLROOT}/usr/share/Insight/bin/tifftopnm
PNMCROP		 = ${ITOOLROOT}/usr/share/Insight/bin/pnmcrop
PNMMARGIN	 = ${ITOOLROOT}/usr/share/Insight/bin/pnmmargin
PNMSCALE	 = ${ITOOLROOT}/usr/share/Insight/bin/pnmscale
PPMQUANT	 = ${ITOOLROOT}/usr/share/Insight/bin/ppmquant

# 3rd party application definitions --- if not already defined
CLHOME		 ?= ${ITOOLROOT}/usr/share/cadleaf
EBTHOME		 ?= ${ITOOLROOT}/usr/share/ebt
EBTRC		 ?= ${EBTHOME}/ebtrc/.ebtrc

# 3rd party tools needed
FMHOME		 ?= ${ITOOLROOT}/usr/frame
FMBATCH          = ${FMHOME}/bin/fmbatch
MIFHEADER	 = "<MIFFile 4.00> \# Generated by FrameMaker xm4.0.3P1a"
MIFTOCGM	 = ${CLHOME}/bin/miftocgm
CGMTOTIFF        = ${CLHOME}/bin/cgmtotiff
CLTRANS		 = ${CLHOME}/bin/cltrans
### CLHOST		 = king.esd
MIFTOCGM_IP	 = orig/.rgb
SGMLRVW          = ${EBTHOME}/bin/sgmlrvw
MKHELP           = ${EBTHOME}/bin/mkhelp
MKBOOK           = ${EBTHOME}/bin/mkbook
MKSGIDOC         = ${EBTHOME}/bin/mksgidoc
PUBBOOK          = ${EBTHOME}/bin/pubbook
OMNIR            = ${ITOOLROOT}/usr/share/Exoterica/omnir

SGIDOC_ENV_FILE	 = ${ITOOLROOT}/usr/share/Exoterica/sgi.env
XHELP_ENV_FILE	 = ${ITOOLROOT}/usr/share/Exoterica/XHELP.env
CONDITION_FILE	= ${ITOOLROOT}/usr/share/Insight/templates/frame/conditional.doc
BOOK_LIB         = ${ITOOLROOT}/usr/share/Insight/templates/SGIDOC
XHELP_LIB        = ${ITOOLROOT}/usr/share/Insight/xhelp
DOCBOOK_LIB      = ${ITOOLROOT}/usr/share/Insight/templates/docbook
INTL_MAP_DIR	 = ${ITOOLROOT}/usr/share/Insight/templates/SGIDOC/intl_map

# Local rules file for figures
LOCALFIGRULES    = localfigrules

# Book defines
BOOK	         = ${TITLE}
HELP_FILE	 = ${TITLE}.sgm
BOOKSHELF        = /usr/share/Insight/library/C_bookshelves/SGI_EndUser
BOOK_ICON	 = generic
BOOK_LANG	 = C
DTD		 = SGIDOC
HIDDEN		 = FALSE
SORT_ORDER	 = ""
BOOKDIR          = books/${BOOK}
BOOKSUBSYSTEM    != echo ${TITLE} | tr "[a-z]" "[A-Z]"
HELPSUBSYSTEM    = ${BOOKSUBSYSTEM}_HELP
HELPDIR		 = /usr/share

MASTER_SGM       = ${BOOK}.sgml
TMP_MASTER_SGM   = ${BOOK}.sgml.tmp
INDEXFILE        = ${BOOK}.idx
