From 0502ed783e1cb77622555c64489d26211288801a Mon Sep 17 00:00:00 2001 From: paltherr Date: Tue, 5 Aug 2003 10:58:29 +0000 Subject: - Added scalatex.mk --- support/make/scalatex.mk | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 support/make/scalatex.mk (limited to 'support/make') diff --git a/support/make/scalatex.mk b/support/make/scalatex.mk new file mode 100644 index 0000000000..01bd2b186f --- /dev/null +++ b/support/make/scalatex.mk @@ -0,0 +1,67 @@ +############################################################-*-Makefile-*-#### +# SCALATEX - Evaluate Embedded Scala Scripts +############################################################################## +# $Id$ + +############################################################################## +# Usage +# +# make scalatex[.clean|.distclean] +# make <*.tex> +# +############################################################################## +# Examples +# +# Generate all .tex files produced by processing a .scala.tex file +# +# make scalatex +# +# +# Generate tutorial.tex by processing tutorial.scala.tex +# +# make tutorial.tex +# +############################################################################## + +############################################################################## +# Defaults + +SCSH ?= scsh + +############################################################################## +# Values + +scalatex_ENV ?= CLASSPATH=$(PROJECT_CLASSPATH) +scalatex_SCRIPT ?= $(PROJECT_SUPPORTDIR)/latex/scalatex.scm + +############################################################################## +# Commands + +all : scalatex +clean : scalatex.clean +distclean : scalatex.distclean + +scalatex : $(patsubst %.scala.tex,%.tex,$(wildcard *.scala.tex)) + +scalatex.clean : + +scalatex.distclean : + @for file in *.scala.tex; do \ + [ "$$file" = "*.scala.tex" ] || ( \ + echo $(RM) "$${file%.scala.tex}.tex"; \ + $(RM) "$${file%.scala.tex}.tex" ); \ + done + +.PHONY : scalatex +.PHONY : scalatex.clean +.PHONY : scalatex.distclean + +############################################################################## +# Rules + +%.tex : %.scala.tex + $(scalatex_ENV) $(SCSH) -e main -s $(scalatex_SCRIPT) $< $@ + +.PRECIOUS : %.tex + +############################################################################## -- cgit v1.2.3