1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-29 14:34:53 +03:00

makefile: fix PATH that apparently differs with make variants

This commit is contained in:
Rasmus Andersson 2021-06-18 12:54:01 -07:00
parent a54153ae2d
commit 18a9030073

View File

@ -75,6 +75,9 @@ all_var_display: \
# Hinted variable font disabled. See https://github.com/rsms/inter/issues/75
# all_var_hinted: $(FONTDIR)/var-hinted/Inter.var.ttf $(FONTDIR)/var-hinted/Inter.var.woff2
BIN := $(PWD)/build/venv/bin
export PATH := $(BIN):$(PATH)
# list make targets
# We copy the Makefile (first in MAKEFILE_LIST) and disable the include to only list
# primary targets, avoiding the generated targets.
@ -94,8 +97,6 @@ list_all:
| sort \
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
export PATH := $(PWD)/build/venv/bin:$(PATH)
# generated.make is automatically generated by init.sh and defines depenencies for
# all styles and alias targets
include build/etc/generated.make
@ -103,11 +104,11 @@ include build/etc/generated.make
# WOFF2 from TTF
build/%.woff2: build/%.ttf
woff2_compress "$<"
$(BIN)/woff2_compress "$<"
# WOFF from TTF
build/%.woff: build/%.ttf
ttf2woff -O -t woff "$<" "$@"
$(BIN)/ttf2woff -O -t woff "$<" "$@"
@ -115,8 +116,8 @@ build/%.woff: build/%.ttf
$(FONTDIR)/var/Inter.var.ttf: $(all_ufo_masters_text) version.txt
@mkdir -p "$(dir $@)"
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter.designspace
gftools fix-unwanted-tables -t MVAR $@
gftools fix-dsig --autofix $@
$(BIN)/gftools fix-unwanted-tables -t MVAR $@
$(BIN)/gftools fix-dsig --autofix $@
$(FONTDIR)/var/Inter-V.var.ttf: $(FONTDIR)/var/Inter.var.ttf
misc/fontbuild rename --family "Inter V" -o $@ $<
@ -125,15 +126,15 @@ $(FONTDIR)/var/Inter-%.var.ttf: build/ufo/Inter-%.designspace $(all_ufo_masters_
@mkdir -p "$(dir $@)"
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
misc/tools/fix-vf-meta.py $@
gftools fix-unwanted-tables -t MVAR $@
gftools fix-dsig --autofix $@
$(BIN)/gftools fix-unwanted-tables -t MVAR $@
$(BIN)/gftools fix-dsig --autofix $@
$(FONTDIR)/var/InterDisplay.var.ttf: $(all_ufo_masters_display) version.txt
@mkdir -p "$(dir $@)"
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/InterDisplay.designspace
gftools fix-unwanted-tables -t MVAR $@
gftools fix-dsig --autofix $@
$(BIN)/gftools fix-unwanted-tables -t MVAR $@
$(BIN)/gftools fix-dsig --autofix $@
$(FONTDIR)/var/InterDisplay-V.var.ttf: $(FONTDIR)/var/InterDisplay.var.ttf
misc/fontbuild rename --family "Inter Display V" -o $@ $<
@ -142,8 +143,8 @@ $(FONTDIR)/var/InterDisplay-%.var.ttf: build/ufo/InterDisplay-%.designspace $(al
@mkdir -p "$(dir $@)"
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
misc/tools/fix-vf-meta.py $@
gftools fix-unwanted-tables -t MVAR $@
gftools fix-dsig --autofix $@
$(BIN)/gftools fix-unwanted-tables -t MVAR $@
$(BIN)/gftools fix-dsig --autofix $@
# OTF/TTF from UFO
@ -201,7 +202,7 @@ build/ufo/features: src/features
# hinted TTF files via autohint
$(FONTDIR)/const-hinted/%.ttf: $(FONTDIR)/const/%.ttf
mkdir -p "$(dir $@)"
ttfautohint --windows-compatibility --adjust-subglyphs --no-info "$<" "$@"
$(BIN)/ttfautohint --windows-compatibility --adjust-subglyphs --no-info "$<" "$@"
# python -m ttfautohint --fallback-stem-width=256 --no-info "$<" "$@"
@ -251,38 +252,38 @@ FBAKE_VAR_ARGS := $(FBAKE_ARGS) -x com.google.fonts/check/STAT_strings
# static text family
build/fbreport-text-const.txt: $(wildcard $(FONTDIR)/const/Inter-*.otf)
@echo "fontbakery check-universal Inter-*.otf > $(@) ..."
@fontbakery $(FBAKE_STATIC_ARGS) $^ > $@ || (cat $@; exit 1)
@$(BIN)/fontbakery $(FBAKE_STATIC_ARGS) $^ > $@ || (cat $@; exit 1)
@echo "fontbakery check-universal Inter-*.otf OK"
# multi-axis VF text family
build/fbreport-text-var2.txt: $(FONTDIR)/var/Inter.var.ttf
@echo "fontbakery check-universal Inter.var.ttf > $(@) ..."
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@$(BIN)/fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@echo "fontbakery check-universal Inter.var.ttf"
# single-axis VF text family
build/fbreport-text-var1.txt: $(wildcard $(FONTDIR)/var/Inter-*.var.ttf)
@echo "fontbakery check-universal Inter-*.var.ttf > $(@) ..."
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@$(BIN)/fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@echo "fontbakery check-universal Inter-*.var.ttf"
# static display family
build/fbreport-display-const.txt: $(wildcard $(FONTDIR)/const/InterDisplay-*.otf)
@echo "fontbakery check-universal InterDisplay-*.otf > $(@) ..."
@fontbakery $(FBAKE_STATIC_ARGS) $^ > $@ || (cat $@; exit 1)
@$(BIN)/fontbakery $(FBAKE_STATIC_ARGS) $^ > $@ || (cat $@; exit 1)
@echo "fontbakery check-universal InterDisplay-*.otf"
# multi-axis VF display family
build/fbreport-display-var2.txt: $(FONTDIR)/var/InterDisplay.var.ttf
@echo "fontbakery check-universal InterDisplay.var.ttf > $(@) ..."
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@$(BIN)/fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@echo "fontbakery check-universal InterDisplay.var.ttf"
# single-axis VF display family
build/fbreport-display-var1.txt: $(wildcard $(FONTDIR)/var/InterDisplay-*.var.ttf)
@echo "fontbakery check-universal InterDisplay-*.var.ttf > $(@) ..."
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@$(BIN)/fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
@echo "fontbakery check-universal InterInterDisplay-*.var.ttf"
# check does the same thing as test, but without any dependency checks, meaning
@ -308,7 +309,7 @@ check_display: $(wildcard $(FONTDIR)/const/InterDisplay-*.ttf) \
@echo "$(@): OK"
check_pedantic: $(FONTDIR)/var/Inter.var.ttf
fontbakery check-universal --dark-theme --loglevel WARN -j \
$(BIN)/fontbakery check-universal --dark-theme --loglevel WARN -j \
-x com.google.fonts/check/unitsperem \
$^