+# A few rules here generate multiple files from one command line. For
+# treating this case, we only declare one output explicitly, and use a
+# dummy rules for the other outputs. The dummy rule uses
+# $(UPDATE_TARGET) so the order of writing in the real command does
+# not confuse make.
+UPDATE_TARGET = if test -f $@; then touch $@ ; fi
+
+# only for fonts which
+#
+# 1. are mentioned in font.scm
+#
+# 2. are not included with teTeX
+#
+$(outdir)/%.lisp: $(outdir)/%.log $(outdir)/%.tfm
+ $(buildscript-dir)/mf-to-table \
+ --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
+ --lisp=$(outdir)/$(<F:.log=.lisp) \
+ --outdir=$(outdir) \
+ --enc $(outdir)/$(<F:.log=.enc) \
+ $<
+
+$(outdir)/%.otf-gtable $(outdir)/%.enc: $(outdir)/%.lisp
+ $(UPDATE_TARGET)
+
+## Putting pfb here forces all .pfb fonts to be built before
+# fontforge starts generating emmentaler-*.* fonts.
+$(outdir)/emmentaler-%.otf: $(outdir)/emmentaler-%.genpe \
+ $(outdir)/feta%.pfb \
+ $(outdir)/feta-noteheads%.pfb \
+ $(outdir)/feta-flags%.pfb \
+ $(outdir)/feta-alphabet%.pfb \
+ $(outdir)/parmesan%.pfb \
+ $(outdir)/parmesan-noteheads%.pfb \
+ $(outdir)/feta%.otf-table \
+ $(outdir)/feta%.otf-gtable \
+ | pfb
+ cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
+
+$(outdir)/emmentaler-%.svg $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.otf
+ $(UPDATE_TARGET)
+
+$(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.pe\
+ $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
+ $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable \
+ | pfb
+ cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
+
+$(outdir)/emmentaler-brace.svg $(outdir)/emmentaler-brace.woff: $(outdir)/emmentaler-brace.otf
+ $(UPDATE_TARGET)