Skip to content

Commit 6d9e694

Browse files
committed
Added luaxml.sty to the build system
1 parent 3cd0eba commit 6d9e694

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
lua_content = $(wildcard luaxml-*.lua)
22
tex_content = $(wildcard *.tex)
3+
sty_content = $(wildcard *.sty)
34
tests = $(wildcard test/*.lua)
45

56
name = luaxml
@@ -9,6 +10,7 @@ doc_file = luaxml.pdf
910
TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME)
1011
INSTALL_DIR = $(TEXMFHOME)/scripts/lua/$(name)
1112
MANUAL_DIR = $(TEXMFHOME)/doc/latex/$(name)
13+
STY_DIR = $(TEXMFHOME)/tex/latex/$(name)
1214
SYSTEM_BIN = /usr/local/bin
1315
BUILD_DIR = build
1416
BUILD_LUAXML = $(BUILD_DIR)/$(name)
@@ -26,7 +28,7 @@ all: doc $(ENTITIES_MODULE)
2628
doc: api $(doc_file)
2729

2830

29-
$(doc_file): $(name).tex $(API_DOC) $(ENTITIES_MODULE)
31+
$(doc_file): $(name).tex $(API_DOC) $(ENTITIES_MODULE)
3032
latexmk -pdf -pdflatex='lualatex "\def\version{${VERSION}}\def\gitdate{${DATE}}\input{%S}"' $(name).tex
3133

3234
api: $(API_DOC)
@@ -52,16 +54,19 @@ test:
5254
build: $(ENTITIES_MODULE) doc test $(lua_content)
5355
@rm -rf build
5456
@mkdir -p $(BUILD_LUAXML)
55-
@cp $(lua_content) $(tex_content) $(doc_file) $(ENTITIES_MODULE) $(BUILD_LUAXML)
57+
@cp $(lua_content) $(tex_content) $(doc_file) $(ENTITIES_MODULE) $(BUILD_LUAXML)
5658
@cat README | sed -e "s/{{VERSION}}/${VERSION}/" | sed -e "s/{{DATE}}/${DATE}/" > $(BUILD_LUAXML)/README
5759
@cat luaxml.tex | sed -e "s/{{VERSION}}/${VERSION}/" > $(BUILD_LUAXML)/luaxml.tex
60+
@cat luaxml.sty | sed -e "s/{{VERSION}}/${VERSION}/" | sed -e "s/{{DATE}}/${DATE}/" > $(BUILD_LUAXML)/luaxml.sty
5861
@cd $(BUILD_DIR) && zip -r luaxml.zip luaxml
5962

6063
install: doc $(lua_content) $(filters)
6164
mkdir -p $(INSTALL_DIR)
6265
mkdir -p $(MANUAL_DIR)
66+
mkdir -p $(STY_DIR)
6367
cp $(doc_file) $(MANUAL_DIR)
6468
cp $(lua_content) $(INSTALL_DIR)
69+
cp $(sty_content) $(STY_DIR)
6570

6671
version:
6772
echo $(VERSION), $(DATE)

luaxml.sty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\ProvidesPackage{luaxml}
1+
\ProvidesPackage{luaxml}[{{DATE}} LuaXML package]
22

33
\RequirePackage{luacode}
44

0 commit comments

Comments
 (0)