# this Makefile uses a flat directory structure for demonstration
# purposes; the main directory (../..) follows a slightly more
# modular organization scheme.

SPLINT_ROOT = $(shell pwd)/../..
SYMBOLS_PREREQS = %.tex %.idx ${SPLINT_XTEXSTYLES} ${SPLINT_ROOT}/cweb/bo.tok symtoks.sty 
SYMBOLS_PREREQS += ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} symswitch.sty ${SPLINT_ROOT}/cweb/bg.y


include ${SPLINT_ROOT}/makefile.inc

# rules specific to this example

all:				symbols.pdf symbols.sns

%.tex:				%.w

%.tex %.idx:			%.w
				${CWEAVE} $<

%.gdx:				${SYMBOLS_PREREQS}
				${TEX} $*.tex

%.pdf %.sns:			${SYMBOLS_PREREQS} %.gdy
				${PDFTEX} $*.tex && touch $*.gdy && touch $*.pdf

docs:				symbols.pdf

clean:				clean_core 
				rm -f symbols.tex

mostlyclean:			clean_temp

distclean:			clean
				cd ${SPLINT_ROOT} && ${MAKE} clean

.PRECIOUS:			symbols.gdy

.INTERMEDIATE:			symbols.gdx
