summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2018-09-10 03:04:36 +0300
committerRasmus Andersson <rasmus@notion.se>2018-09-10 03:04:36 +0300
commiteee57fe27ac18410297b1d6b9638286dbae30392 (patch)
tree2e3b56e98ee3cb3813e3e238d6db4bc33f321ed7
parentf0717a2d8f49581a36508bd607cf6d26071b48dd (diff)
downloadinter-eee57fe27ac18410297b1d6b9638286dbae30392.tar.xz
makefile: prevent intermediate products for being removed by make in some scenarios
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index dc9fdbc7c..4d70d6fc4 100644
--- a/Makefile
+++ b/Makefile
@@ -62,6 +62,9 @@ build/%.woff2: build/%.ttf
build/%.woff: build/%.ttf
ttf2woff -O -t woff "$<" "$@"
+# make sure intermediate TTFs are not gc'd by make
+.PRECIOUS: build/%.ttf
+
# TTF -> EOT (disabled)
# build/%.eot: build/%.ttf
# ttf2eot "$<" > "$@"
@@ -106,6 +109,9 @@ $(Black_ufo_d):
build/ufo/Inter-UI-%.ufo: src/Inter-UI.designspace $(Regular_ufo_d) $(Black_ufo_d)
misc/fontbuild instancegen src/Inter-UI.designspace $*
+# make sure intermediate UFOs are not gc'd by make
+.PRECIOUS: build/ufo/Inter-UI-%.ufo
+
# Note: The seemingly convoluted dependency graph above is required to
# make sure that glyphsync and instancegen are not run in parallel.
@@ -119,6 +125,9 @@ $(FONTDIR)/var-hinted/%.ttf: $(FONTDIR)/var/%.ttf
mkdir -p "$(dir $@)"
ttfautohint --fallback-stem-width=256 --no-info --composites "$<" "$@"
+# make sure intermediate TTFs are not gc'd by make
+.PRECIOUS: $(FONTDIR)/const/%.ttf $(FONTDIR)/var/%.ttf
+
# check var
all_check_var: $(FONTDIR)/var/Inter-UI.var.ttf
misc/fontbuild checkfont $^