diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/Makefile')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/Makefile | 118 |
1 files changed, 112 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/Makefile b/Master/texmf-dist/source/latex/fontspec/Makefile index 606da5ca8e2..d45e10b100c 100644 --- a/Master/texmf-dist/source/latex/fontspec/Makefile +++ b/Master/texmf-dist/source/latex/fontspec/Makefile @@ -45,9 +45,10 @@ UNPACKED = fontspec.sty fontspec-patches.sty fontspec.lua fontspec.cfg $(EXAMPLE SOURCE = $(DTX) Makefile README GENERATED = $(COMPILED) $(UNPACKED) -TESTS = $(shell ls testsuite/*.cls testsuite/*.tex testsuite/*.ltx) +TESTS = $(wildcard testsuite/*.cls testsuite/*.tex testsuite/*.ltx) -DOC_EXAMPLES = $(shell ls doc/*.pdf) +DOC_DIR = doc-files +DOC_EXAMPLES = $(shell ls $(DOC_DIR)/*.pdf) CTAN_FILES = $(SOURCE) $(COMPILED) $(EXAMPLES) $(DOC_EXAMPLES) @@ -84,12 +85,16 @@ tds: $(TDS_ZIP) world: all ctan gendoc: $(DTX) + @mkdir -p $(DOC_DIR) $(DO_PDFLATEX_WRITE18) $(DOC): $(DTX) + @echo "Compiling documentation" $(DO_PDFLATEX) $(DO_MAKEINDEX) + @echo "Re-compiling documentation" $(DO_PDFLATEX) + @echo "Re-re-compiling documentation" $(DO_PDFLATEX) $(UNPACKED): $(DTX) @@ -171,9 +176,13 @@ SUITESOURCE = \ $(testdir)/testsuite.cls \ $(testdir)/$(TESTLIST) -TESTOUT = $(shell ls $(testdir)/*.*safe.pdf) +TESTOUT = $(wildcard $(testdir)/*.*safe.pdf) BUILDTESTSRC = $(subst $(testdir)/,$(builddir)/,$(subst .safe.pdf,.ltx,$(TESTOUT))) -BUILDTESTTARGET = $(subst $(testdir)/,$(builddir)/,$(subst .safe.pdf,.diff.pdf,$(TESTOUT))) +BUILDTESTTARGET1 = $(TESTOUT) +BUILDTESTTARGET2 = $(subst $(testdir)/,$(builddir)/,$(BUILDTESTTARGET1)) +BUILDTESTTARGET3 = $(subst .Xsafe.pdf,-X.diff.pdf,$(BUILDTESTTARGET2)) +BUILDTESTTARGET4 = $(subst .Lsafe.pdf,-L.diff.pdf,$(BUILDTESTTARGET3)) +BUILDTESTTARGET = $(BUILDTESTTARGET4) BUILDSOURCE = $(addprefix $(builddir)/,$(LTXSOURCE)) BUILDSUITE = $(subst $(testdir)/,$(builddir)/,$(SUITESOURCE)) @@ -241,7 +250,7 @@ $(builddir)/F%-L.diff.pdf: $(builddir)/F%-L.pdf fi $(builddir)/F%-X.diff.pdf: $(builddir)/F%-X.pdf - @echo 'F$*: Comparing PDF from LuaLaTeX against reference output.' + @echo 'F$*: Comparing PDF from XeLaTeX against reference output.' if test $(shell compare \ $(COMPARE_OPTS) \ $(builddir)/F$*-X.pdf \ @@ -312,4 +321,101 @@ X%: build/X%.ltx F%: build/F%.ltx make build/F$*-L.diff.pdf - make build/F$*-X.diff.pdf
\ No newline at end of file + make build/F$*-X.diff.pdf + + +###### NIGHTLY BUILDS ###### + +UNAME_S := $(shell uname -s) + +# Mac OS X: +ifeq ($(UNAME_S),Darwin) + MD5 = md5 +endif + +# Linux: +ifeq ($(UNAME_S),Linux) + MD5 = md5sum +endif + +BRANCH = tds-build + +TDS = $(TDS_ZIP) +TMP = /tmp +LOG = $(TMP)/gitlog.tmp + + +checkbranch: + @if git branch | grep $(BRANCH) > /dev/null ; \ + then echo "TDS branch exists"; \ + else \ + echo "TDS branch does not exist; doing so will remove all untracked files from your working directory. Create the TDS branch with\n make createbranch"; \ + false; \ + fi; + +createbranch: $(TDS) + cp -f $(TDS) $(TMP)/ + git symbolic-ref HEAD refs/heads/$(BRANCH) + rm .git/index + git clean -fdx + unzip -o $(TMP)/$(TDS) -d . + rm $(TMP)/$(TDS) + git add --all + git commit -m "Initial TDS commit" + git checkout master + git push origin $(BRANCH) master + @echo "\nTDS branch creation was successful.\n" + @echo "Now create a new package at TLContrib: http://tlcontrib.metatex.org/" + @echo "Use the following metadata:" + @echo " Package ID: $(NAME)" + @echo " BRANCH: $(BRANCH)" + @echo "\nAfter this process, use \`make tdsbuild\` to" + @echo " (a) push your recent work on the master branch," + @echo " (b) automatically create a TDS snapshot," + @echo " (c) send the TDS snapshot to TLContrib." + + +ifeq ($(UNAME_S),Darwin) + nightly: USERNAME = $(shell security find-internet-password -s tlcontrib.metatex.org | grep "acct" | cut -f 4 -d \") + nightly: PASSWORD = $(shell security 2>&1 >/dev/null find-internet-password -gs tlcontrib.metatex.org | cut -f 2 -d ' ') +endif + +ifeq ($(UNAME_S),Linux) + nightly: USERNAME = "" + nightly: PASSWORD = "" +endif + +nightly: VERSION = $(shell date "+%Y-%m-%d@%H:%M") + +nightly: CHECKSUM = $(shell echo $(USERNAME)/$(PASSWORD)/$(VERSION) | $(MD5) ) + +nightly: tdsbuild checkbranch checkpw + @echo "Pushing TDS and master branch" + git push origin $(BRANCH) master + @echo "Pinging TLContrib for automatic update" + curl http://tlcontrib.metatex.org/cgi-bin/package.cgi/action=notify/key=$(NAME)/check=$(CHECKSUM)?version=$(VERSION) > /dev/null 2>&1 + +tdsbuild: $(TDS) + cp -f $(TDS) $(TMP)/ + @echo "Constructing commit history for snapshot build" + date "+TDS snapshot %Y-%m-%d %H:%M" > $(LOG) + echo '\n\nApproximate commit history since last snapshot:\n' >> $(LOG) + git log --after="`git log -b $(BRANCH) -n 1 --pretty=format:"%aD"`" --pretty=format:"%+H%+s%+b" >> $(LOG) + @echo "Committing TDS snapshot to separate branch" + git checkout $(BRANCH) + unzip -o $(TMP)/$(TDS) -d . + rm $(TMP)/$(TDS) + git commit --all --file=$(LOG) + git checkout master + @echo "Branches 'master' and '$(BRANCH)' should now be pushed." + +checkpw: + @if test ! -n "$(PASSWORD)" ; then \ + echo "Error: Password cannot be found for TLContrib." ; \ + false ; \ + fi ; + @echo "Username: $(USERNAME)" + @echo "Password: [omitted]" + @echo "Version: $(VERSION)" + @echo "Checksum: $(CHECKSUM)" + |