
PS_HANDOUTS  = ${PDF_TARGETS:%.pdf=%-handouts.ps}
PDF_HANDOUTS = ${PS_HANDOUTS:%.ps=%.pdf}

all: ${PDF_HANDOUTS}

%-handouts.ps: %.ps
	psnup -n 4 < $< > $@

%-handouts.ps: %.pdf
	pdf2ps $< | psnup -n 4 > $@

#------------------------------------------------------------------------------

DRAWING_DIR = drawings

.PHONY: drawings cleandrawings

#------------------------------------------------------------------------------

${DRAWING_DIR}/%.pstex_t: ${DRAWING_DIR}/%.fig
	make -C ${dir $<} ${notdir $@}

${DRAWING_DIR}/%.pstex: ${DRAWING_DIR}/%.fig
	make -C ${dir $<} ${notdir $@}

${DRAWING_DIR}/%.ps: ${DRAWING_DIR}/%.gnuplot
	make -C ${dir $<} ${notdir $@}

${DRAWING_DIR}/%:
	make -C ${dir $@} $*

#------------------------------------------------------------------------------

drawings:
	${MAKE} -C ${DRAWING_DIR}

cleandrawings:
	${MAKE} -C ${DRAWING_DIR} cleanAll

cleanAll: cleandrawings
