diff options
author | Karl Berry <karl@freefriends.org> | 2021-09-16 20:18:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-09-16 20:18:12 +0000 |
commit | b33e18a5efa7b022c42aee2adec507dd6917ec28 (patch) | |
tree | bba2f6f8bc7a840ba65e5ec0ec78d3ec5a463deb /Master/texmf-dist/source/support/lua-uca | |
parent | fd4d90b5caf562a8d951bb4a3b78a1aa74930017 (diff) |
lua-uca (16sep21)
git-svn-id: svn://tug.org/texlive/trunk@60523 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/support/lua-uca')
-rw-r--r-- | Master/texmf-dist/source/support/lua-uca/Makefile | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/support/lua-uca/Makefile b/Master/texmf-dist/source/support/lua-uca/Makefile new file mode 100644 index 00000000000..953181e94ef --- /dev/null +++ b/Master/texmf-dist/source/support/lua-uca/Makefile @@ -0,0 +1,67 @@ +lua_content = $(wildcard src/lua-uca/*.lua) +TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME) +INSTALL_DIR = ${TEXMFHOME}/scripts/lua/lua-uca/ +LUA_DIR = src/lua-uca/ +VERSION:= undefined +DATE:= undefined +README = README.md +DOC_BASE = lua-uca-doc +DOC_SOURCES = $(DOC_BASE).tex $(README) CHANGELOG.md LICENSE HACKING.md +DOC_PDF = $(DOC_BASE).pdf +BUILD_DIR = build + +ifeq ($(strip $(shell git rev-parse --is-inside-work-tree 2>/dev/null)),true) + VERSION:= $(shell git --no-pager describe --abbrev=0 --tags --always ) + DATE:= $(firstword $(shell git --no-pager show --date=short --format="%ad" --name-only)) +endif + + +all: data/allkeys.txt data/common src/lua-uca/lua-uca-ducet.lua src/lua-uca/lua-uca-reordering-table.lua $(DOC_PDF) + + + +data/allkeys.txt: + mkdir data + wget http://www.unicode.org/Public/UCA/latest/allkeys.txt + mv allkeys.txt data + +data/common: + wget http://unicode.org/Public/cldr/33/cldr-common-33.0.zip + unzip cldr-common-33.0.zip "common/collation/*" -d data/ + rm cldr-common-33.0.zip + +src/lua-uca/lua-uca-ducet.lua: + mkdir -p src/lua-uca + texlua tools/make_ducet.lua > src/lua-uca/lua-uca-ducet.lua + +src/lua-uca/lua-uca-reordering-table.lua: + mkdir -p src/lua-uca + texlua tools/make_reordering_table.lua > $@ + +.PHONY: test install + +test: + busted spec/ducet-spec.lua + busted spec/collator_spec.lua + busted spec/languages-spec.lua + busted spec/tailoring-spec.lua + +$(DOC_PDF): $(DOC_SOURCES) + lualatex '\def\version{${VERSION}}\def\gitdate{${DATE}}\input{$<}' + + +install: + mkdir -p ${INSTALL_DIR} + cp ${LUA_DIR}*.lua ${INSTALL_DIR} + +xindex: + $(MAKE) -C $@ + +build: $(DOC_PDF) $(DOC_SOURCES) $(lua_content) + mkdir -p $(BUILD_DIR)/lua-uca/lua-uca + cp $(lua_content) $(BUILD_DIR)/lua-uca/lua-uca/ + cp $(DOC_PDF) $(DOC_SOURCES) Makefile $(BUILD_DIR)/lua-uca/ + @cd $(BUILD_DIR) && zip -r lua-uca.zip lua-uca + + +.PHONY: all xindex build |