Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Makefile] some cleanup #121

Merged
merged 3 commits into from
Jan 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ WPCK=$(NAME)-$(VERSION)-web
DIST=$(NAME)-$(VERSION)-complete

#Call script through fontforge, not python. https://github.com/fontforge/fontforge/issues/528
#FF=fontforge
FF=fontforge
#Return to python because we don’t scale the font any longer.
PYTHON?=python
SCRIPT=tools/makefont.py
SFNTTOOL=java -jar sfnttool.jar

#SIZES=08 12
#STYLES=Regular SC Allsc Italic Bold
Expand All @@ -24,17 +23,15 @@ FONTS=08-Regular 08-Italic 12-Regular SC12-Regular 12-AllSC 12-Italic -Initials
SFD=$(FONTS:%=$(SRC)/$(NAME)%.sfdir)
OTF=$(FONTS:%=$(BLD)/$(NAME)%.otf)
TTF=$(FONTS:%=$(BLD)/$(NAME)%.ttf)
WTT=$(FONTS:%=$(WEB)/$(NAME)%.ttf)
WOF=$(FONTS:%=$(WEB)/$(NAME)%.woff)
EOT=$(FONTS:%=$(WEB)/$(NAME)%.eot)
PDF=$(FONTS:%=$(SPEC)/$(NAME)%-Glyphs.pdf)

all: otf ttf webfonts # pdfs
pack: dpack wpack

otf: $(OTF)
ttf: $(TTF)
webfonts: $(WOF) $(EOT)
webfonts: $(WOF)
pdfs: $(PDF)

$(BLD):
Expand All @@ -57,13 +54,7 @@ $(BLD)/%.ttf: $(SRC)/%.sfdir Makefile $(SCRIPT) | $(BLD)

$(WEB)/%.woff: $(BLD)/%.ttf | $(WEB) $(BLD)
@echo "Generating $@"
@$(SFNTTOOL) -w $< $@
# @sfnt2woff $<

$(WEB)/%.eot: $(BLD)/%.ttf | $(WEB) $(BLD)
@echo "Generating $@"
@$(SFNTTOOL) -e -x $< $@
# @ttf2eot $< > $@
@fontforge -lang=ff -c 'Open($$1); Generate($$2)' $< $@

$(SPEC)/%-Glyphs.pdf: $(BLD)/%.ttf $(SPEC)
@echo "Generating $@"
Expand All @@ -83,13 +74,13 @@ dpack: $(OTF) $(TTF)
@cp Changes README.markdown README.xelualatex COPYING $(PACK)
@zip -r $(PACK).zip $(PACK)

wpack: $(WOF) $(EOT)
wpack: $(WOF)
@echo "Packing webfonts to zipfile"
@mkdir -p $(WPCK)
@cp $(WOF) $(EOT) README.markdown COPYING $(WPCK)
@cp $(WOF) README.markdown COPYING $(WPCK)
@zip -r $(WPCK).zip $(WPCK)

dist: $(OTF) $(TTF) $(WOF) $(EOT)
dist: $(OTF) $(TTF) $(WOF)
@echo "Making dist tarball"
@mkdir -p $(DIST)/$(SRC)
@mkdir -p $(DIST)/$(BLD)
Expand All @@ -98,7 +89,6 @@ dist: $(OTF) $(TTF) $(WOF) $(EOT)
@mkdir -p $(DIST)/$(SPEC)
@cp -r $(SFD) $(DIST)/$(SRC)
@cp $(OTF) $(TTF) $(DIST)/$(BLD)
@cp $(WOF) $(EOT) $(DIST)/$(WEB)
# @cp $(PDF) $(SPEC)/Specimen.pdf $(DIST)/$(SPEC) #Temporarily out of order
@cp $(SPEC)/Specimen.pdf $(DIST)/$(SPEC)
@cp $(SCRIPT) $(DIST)/tools
Expand All @@ -109,4 +99,4 @@ cleanpack:
@rm -rf $(PACK) $(PACK).zip $(WPCK) $(WPCK).zip

clean:
@rm -rf $(OTF) $(TTF) $(WTT) $(WOF) $(EOT) $(PDF) $(PACK) $(PACK).zip $(WPCK) $(WPCK).zip $(DIST) $(DIST).zip
@rm -rf $(OTF) $(TTF) $(WOF) $(PDF) $(PACK) $(PACK).zip $(WPCK) $(WPCK).zip $(DIST) $(DIST).zip