JKQtPlotter/lib/jkqtmathtext/resources/xits/Makefile

70 lines
1.5 KiB
Makefile
Raw Normal View History

NAME=XITS
2019-11-16 21:16:45 +08:00
VERSION=1.302
SRC=sources
WEB=webfonts
TOOLS=tools
DIST=$(NAME)-$(VERSION)
DIST_CTAN=$(DIST)-CTAN
PY=python
MAKEFNT=$(TOOLS)/makefnt.py
MAKEWEB=$(TOOLS)/makeweb.py
2019-11-16 21:16:45 +08:00
NORMALIZE=$(TOOLS)/sfdnormalize.py
FONTS=$(NAME)Math-Regular $(NAME)Math-Bold \
$(NAME)-Regular $(NAME)-Bold $(NAME)-Italic $(NAME)-BoldItalic
SFD=$(FONTS:%=$(SRC)/%.sfd)
OTF=$(FONTS:%=%.otf)
WOF=$(FONTS:%=$(WEB)/%.woff)
2019-11-16 21:16:45 +08:00
NRM=$(FONTS:%=$(SRC)/%.nrm)
CHK=$(FONTS:%=$(SRC)/%.chk)
all: otf
otf: $(OTF)
web: $(WOF)
2019-11-16 21:16:45 +08:00
normalize: $(NRM)
check: $(CHK)
%.otf: $(SRC)/%.sfd $(SRC)/%.fea
@echo "Building $@"
@$(PY) $(MAKEFNT) $< $@ --version=$(VERSION) --features=$(word 2,$+)
2019-11-16 21:16:45 +08:00
%.nrm: %.sfd $(NORMALIZE)
@echo "Normalizing $(*F)"
@$(PY) $(NORMALIZE) $< $@
@if [ "`diff -u $< $@`" ]; then cp $@ $<; touch $@; fi
%.chk: %.sfd $(NORMALIZE)
@echo "Normalizing $(*F)"
@$(PY) $(NORMALIZE) $< $@
@diff -u $< $@ || (rm -rf $@ && false)
$(WEB)/%.woff: %.otf
@echo "Building $@"
@mkdir -p $(WEB)
@$(PY) $(MAKEWEB) $< $(WEB)
2019-11-16 21:16:45 +08:00
dist: check dist-ctan $(OTF) $(WOF)
@echo "Making dist tarball"
@mkdir -p $(DIST)/$(WEB)
@cp $(OTF) $(DIST)
@cp $(WOF) $(DIST)/$(WEB)
2019-11-16 21:16:45 +08:00
@cp -r OFL.txt FONTLOG.txt $(DIST)
@cp README.md $(DIST)/README.txt
@zip -r $(DIST).zip $(DIST)
2019-11-16 21:16:45 +08:00
dist-ctan: $(OTF)
@echo "Making CTAN dist tarball"
@mkdir -p $(DIST_CTAN)
@cp $(OTF) $(DIST_CTAN)
2019-11-16 21:16:45 +08:00
@cp -r OFL.txt FONTLOG.txt $(DIST_CTAN)
@cp README.md $(DIST_CTAN)/README.txt
@zip -r $(DIST_CTAN).zip $(DIST_CTAN)
clean:
2019-11-16 21:16:45 +08:00
@rm -rf $(OTF) $(DIST) $(DIST).zip $(DIST_CTAN) $(DIST_CTAN).zip $(NRM)\
$(CHK)