summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/unicode-math/Makefile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-18 22:29:36 +0000
committerKarl Berry <karl@freefriends.org>2011-09-18 22:29:36 +0000
commit793be33975bf8f6986bb6435f2039c7c34ac3c15 (patch)
tree873887f99fef55a52edf3614dd48ec340b1515e6 /Master/texmf-dist/source/latex/unicode-math/Makefile
parent4c7c93512d5ad99119fc38035815ba54a17605a5 (diff)
unicode-math 0.6 (18sep11)
git-svn-id: svn://tug.org/texlive/trunk@24003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/unicode-math/Makefile')
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/Makefile95
1 files changed, 50 insertions, 45 deletions
diff --git a/Master/texmf-dist/source/latex/unicode-math/Makefile b/Master/texmf-dist/source/latex/unicode-math/Makefile
index b75e1574945..807cda3fe6e 100644
--- a/Master/texmf-dist/source/latex/unicode-math/Makefile
+++ b/Master/texmf-dist/source/latex/unicode-math/Makefile
@@ -27,6 +27,10 @@ help:
echo ' xfile F=<abc> - compile file <abc> with XeLaTeX'
echo ' lfile F=<abc> - compile file <abc> with LuaLaTeX'
echo ' '
+ echo ' '
+ echo 'Append `hometree=none` to any of the above to disable searching
+ echo 'the home texmf directory.'
+ echo ' '
echo 'To add a new test, add a file called X****.ltx to'
echo 'directory testfiles/, run `make initest` and ensure'
echo 'that the output X****.safe.pdf is correct.'
@@ -58,7 +62,9 @@ builddir=build
tds=$(builddir)/$(PKG).tds
UPDATE = `which dtx-update` || true # TODO: generalise
-SPEAKFAIL := `say 'Test failed!'` || true # Mac OS X only?
+SPEAKFAIL := say 'Test failed!' || true # Mac OS X only?
+
+hometree = `kpsewhich -var-value=TEXMFHOME`
# these files end up in the CTAN directory:
@@ -70,12 +76,14 @@ BUILDDOC = $(addprefix $(builddir)/,$(DOC))
#
-LTXSOURCE = $(PKG).sty $(PKG).lua $(TBL)
+LTXSOURCE = $(PKG).sty $(PKG)-xetex.sty $(PKG)-luatex.sty $(PKG).lua $(TBL)
# and this is how the TDS zip file is produced:
INSFILES = \
$(tds)/tex/latex/$(PKG)/unicode-math.sty \
+ $(tds)/tex/latex/$(PKG)/unicode-math-xetex.sty \
+ $(tds)/tex/latex/$(PKG)/unicode-math-luatex.sty \
$(tds)/tex/latex/$(PKG)/unicode-math.lua \
$(tds)/tex/latex/$(PKG)/unicode-math-table.tex
@@ -103,7 +111,7 @@ README:
$(XMPL):
clean:
- rm -rf $(builddir)
+ rm -rf $(builddir)/*
rm -f $(PKG).zip $(PKG).pdf $(SUITE).pdf
all: clean doc ctan
@@ -127,14 +135,14 @@ $(builddir)/$(PKG).lua: $(builddir)/$(PKG).dtx
$(builddir)/$(PKG).pdf: $(builddir)/$(PKG).dtx $(BUILDSOURCE)
cd $(builddir) && \
- xelatex $(PKG).dtx && \
+ $(run_xelatex) $(PKG).dtx && \
makeindex -s gind.ist $(PKG) && \
- xelatex $(PKG).dtx;
+ $(run_xelatex) $(PKG).dtx;
$(builddir)/$(SYM).pdf: $(builddir)/$(SYM).ltx
cd $(builddir) && \
- xelatex $(SYM).ltx && \
- xelatex $(SYM).ltx;
+ $(run_xelatex) $(SYM).ltx && \
+ $(run_xelatex) $(SYM).ltx;
$(builddir)/%.ltx: $(testdir)/%.ltx
$(COPY) $< $@
@@ -204,26 +212,32 @@ install-sys: $(INSFILES)
fi ;
+run_xelatex = export TEXMFHOME=$(hometree) && xelatex
+run_lualatex = export TEXMFHOME=$(hometree) && lualatex
##### USEFUL FOR TEST FILES #####
xfile: $(F) $(BUILDSOURCE)
if test -z "$(F)" ; then \
- echo "Need a filename!\nE.g. \`make xfile F=test.ltx\`" ; \
- false ; \
+ echo "Typesetting test.tex:"; \
+ $(COPY) test.tex $(builddir)/test.tex; \
+ cd $(builddir); $(run_xelatex) test.tex; \
+ else \
+ echo Typesetting $(F):; \
+ $(COPY) $(F) $(builddir)/$(F); \
+ cd $(builddir); $(run_xelatex) $(F); \
fi
- echo Typesetting $(F):
- $(COPY) $(F) $(builddir)/$(F)
- cd $(builddir); xelatex $(F)
lfile: $(F) $(BUILDSOURCE)
if test -z "$(F)" ; then \
- echo "Need a filename!\nE.g. \`make lfile F=test.ltx\`" ; \
- false ; \
+ echo "Typesetting test.tex:"; \
+ $(COPY) test.tex $(builddir)/test.tex; \
+ cd $(builddir); $(run_lualatex) test.tex; \
+ else \
+ echo Typesetting $(F):; \
+ $(COPY) $(F) $(builddir)/$(F); \
+ cd $(builddir); $(run_lualatex) $(F); \
fi
- echo Typesetting $(F):
- $(COPY) $(F) $(builddir)/$(F)
- cd $(builddir); lualatex $(F)
#############
@@ -246,7 +260,7 @@ COMPARE_OPTS = -density 300x300 -metric ae -fuzz 35%
# Redefine this to print output if you need:
REDIRECT = > /dev/null
-LTXSOURCE = $(NAME).sty $(NAME).lua
+LTXSOURCE = $(NAME).sty $(NAME)-xetex.sty $(NAME)-luatex.sty $(NAME).lua
TESTLIST = umtest-suite-X.tex umtest-suite-L.tex umtest-suite-F.tex
@@ -271,21 +285,18 @@ BUILDFILES = $(BUILDSOURCE) $(BUILDSUITE) $(BUILDTESTSRC) $(BUILDTESTTARGET)
$(builddir)/$(SUITE).pdf: $(builddir)/$(SUITE).ltx $(BUILDSUITE)
cd $(builddir) && \
- xelatex $(SUITE).ltx
+ $(run_xelatex) $(SUITE).ltx
#### All tests ####
-foo:
- echo $(BUILDTESTTARGET)
-
check: $(TESTLIST)
$(TESTLIST): $(BUILDFILES)
cd $(testdir) && \
ls X*.safe.pdf | sed -e 's/\(.*\).safe.pdf/\\inserttest{\1}/g' > umtest-suite-X.tex && \
ls L*.safe.pdf | sed -e 's/\(.*\).safe.pdf/\\inserttest{\1}/g' > umtest-suite-L.tex && \
- ls F*.safe.pdf | sed -e 's/\(.*\).safe.pdf/\\inserttest{\1}/g' > umtest-suite-F.tex;
+ ls F*-L.safe.pdf | sed -e 's/\(.*\).safe.pdf/\\inserttest{\1}/g' > umtest-suite-F.tex;
$(builddir)/%: $(testdir)/%
@mkdir -p $(builddir); \
@@ -329,11 +340,9 @@ $(Llonelypath): $(Llonelytest)
$(builddir)/F%-L.diff.pdf: $(builddir)/F%-L.pdf
@echo 'F$*: Comparing PDF from LuaLaTeX against reference output.'
- if test $(shell compare \
- $(COMPARE_OPTS) \
- $(builddir)/F$*-L.pdf \
- $(testdir)/F$*-L.safe.pdf \
- $(builddir)/F$*-L.diff.pdf 2>&1) -le 1 ; then \
+ compare_result="$$(compare "$(builddir)/F$*-L.pdf" "$(testdir)/F$*-L.safe.pdf" $(COMPARE_OPTS) "$(builddir)/F$*-L.diff.pdf" 2>&1)" ; \
+ if [ 0 -eq "$$?" -a 1 -ge "$$compare_result" ] ; \
+ then \
echo 'F$*: Test passed.' ; \
else \
echo 'F$*: Test failed.' ; \
@@ -343,11 +352,9 @@ $(builddir)/F%-L.diff.pdf: $(builddir)/F%-L.pdf
$(builddir)/F%-X.diff.pdf: $(builddir)/F%-X.pdf
@echo 'F$*: Comparing PDF from XeLaTeX against reference output.'
- if test $(shell compare \
- $(COMPARE_OPTS) \
- $(builddir)/F$*-X.pdf \
- $(testdir)/F$*-X.safe.pdf \
- $(builddir)/F$*-X.diff.pdf 2>&1) -le 1 ; then \
+ compare_result="$$(compare "$(builddir)/F$*-X.pdf" "$(testdir)/F$*-X.safe.pdf" $(COMPARE_OPTS) "$(builddir)/F$*-X.diff.pdf" 2>&1)" ; \
+ if [ 0 -eq "$$?" -a 1 -ge "$$compare_result" ] ; \
+ then \
echo 'F$*: Test passed.' ; \
else \
echo 'F$*: Test failed.' ; \
@@ -357,11 +364,11 @@ $(builddir)/F%-X.diff.pdf: $(builddir)/F%-X.pdf
$(builddir)/F%-L.pdf: $(BUILDSOURCE) $(builddir)/F%-L.ltx
@echo 'F$*: Generating PDF output with LuaLaTeX.'
- @cd $(builddir); lualatex -interaction=nonstopmode F$*-L.ltx $(REDIRECT)
+ @cd $(builddir); $(run_lualatex) -interaction=nonstopmode F$*-L.ltx $(REDIRECT)
$(builddir)/F%-X.pdf: $(BUILDSOURCE) $(builddir)/F%-X.ltx
@echo 'F$*: Generating PDF output with XeLaTeX.'
- @cd $(builddir); xelatex -interaction=nonstopmode F$*-X.ltx $(REDIRECT)
+ @cd $(builddir); $(run_xelatex) -interaction=nonstopmode F$*-X.ltx $(REDIRECT)
$(builddir)/F%-L.ltx: $(builddir)/F%.ltx
$(COPY) $< $@
@@ -374,9 +381,9 @@ $(builddir)/F%-X.ltx: $(builddir)/F%.ltx
$(builddir)/L%.diff.pdf: $(builddir)/L%.pdf
@echo 'L$*: Comparing PDF against reference output.'
- if test $(shell compare $(COMPARE_OPTS) \
- $(builddir)/L$*.pdf $(testdir)/L$*.safe.pdf \
- $(builddir)/L$*.diff.pdf 2>&1) -le 1 ; then \
+ compare_result="$$(compare "$(builddir)/L$*.pdf" "$(testdir)/L$*.safe.pdf" $(COMPARE_OPTS) "$(builddir)/L$*.diff.pdf" 2>&1)" ; \
+ if [ 0 -eq "$$?" -a 1 -ge "$$compare_result" ] ; \
+ then \
echo 'L$*: Test passed.' ; \
else \
echo 'L$*: Test failed.' ; \
@@ -386,11 +393,9 @@ $(builddir)/L%.diff.pdf: $(builddir)/L%.pdf
$(builddir)/X%.diff.pdf: $(builddir)/X%.pdf
@echo 'X$*: Comparing PDF against reference output.'
- if test $(shell compare \
- $(COMPARE_OPTS) \
- $(builddir)/X$*.pdf \
- $(testdir)/X$*.safe.pdf \
- $(builddir)/X$*.diff.pdf 2>&1) -le 1 ; then \
+ compare_result="$$(compare "$(builddir)/X$*.pdf" "$(testdir)/X$*.safe.pdf" $(COMPARE_OPTS) "$(builddir)/X$*.diff.pdf" 2>&1)" ; \
+ if [ 0 -eq "$$?" -a 1 -ge "$$compare_result" ] ; \
+ then \
echo 'X$*: Test passed.' ; \
else \
echo 'X$*: Test failed.' ; \
@@ -400,11 +405,11 @@ $(builddir)/X%.diff.pdf: $(builddir)/X%.pdf
$(builddir)/X%.pdf: $(BUILDSOURCE) $(BUILDSUITE) $(builddir)/X%.ltx
@echo 'X$*: Generating PDF output with XeLaTeX.'
- @cd $(builddir); xelatex -interaction=nonstopmode X$*.ltx $(REDIRECT)
+ @cd $(builddir) && $(run_xelatex) -interaction=nonstopmode X$*.ltx $(REDIRECT)
$(builddir)/L%.pdf: $(BUILDSOURCE) $(BUILDSUITE) $(builddir)/L%.ltx
@echo 'L$*: Generating PDF output with LuaLaTeX.'
- @cd $(builddir); lualatex -interaction=nonstopmode L$*.ltx $(REDIRECT)
+ @cd $(builddir) && $(run_lualatex) -interaction=nonstopmode L$*.ltx $(REDIRECT)
#### HACK: allow `make <foobar>` run that test.