lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripts/build/scan-mf-deps: script to generate MF dependencies (issu


From: jonas . hahnfeld
Subject: Re: scripts/build/scan-mf-deps: script to generate MF dependencies (issue 553700043 by address@hidden)
Date: Wed, 18 Mar 2020 06:27:51 -0700

The latest version fails for me, see my inline comment. The following
still works and I think it is correct to specify multiple outputs:

diff --git a/mf/GNUmakefile b/mf/GNUmakefile
index f21d1650d5..da5330e93d 100644
--- a/mf/GNUmakefile
+++ b/mf/GNUmakefile
@@ -32,11 +32,9 @@ $(outdir)/%.dvi: %.mf
        mv $(basename $<).dvi $(outdir)
        rm $(basename $<).*gf
 
-$(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem invoke-mf2pt1.sh
-       $(call ly_progress,Making,$@,< mf)
-       $(src-dir)/invoke-mf2pt1.sh $(buildscript-dir)/mf2pt1 $< $@
$(METAFONT_QUIET)
-
-$(outdir)/%.tfm $(outdir)/%.log: $(outdir)/%.pfb
+$(outdir)/%.pfb $(outdir)/%.tfm $(outdir)/%.log: %.mf
$(outdir)/mf2pt1.mem invoke-mf2pt1.sh
+       $(call ly_progress,Making,$(outdir)/$*.pfb,< mf)
+       $(src-dir)/invoke-mf2pt1.sh $(buildscript-dir)/mf2pt1 $<
$(outdir)/$*.pfb $(METAFONT_QUIET)
 
 # since recent mpost versions no longer create a mem file, we create a
dummy
 # file to satisfy the dependency (which gets overwritten in case an
older
@@ -62,7 +60,7 @@ $(outdir)/emmentaler-%.genpe:
$(buildscript-dir)/gen-emmentaler-scripts
        $< --dir=$(outdir) --design-size=$(patsubst
emmentaler-%.genpe,%,$(notdir $@))
 
 
-EXTRA_DIST_FILES += README mf2pt1.mp invoke-mf2pt.sh r
+EXTRA_DIST_FILES += README mf2pt1.mp invoke-mf2pt.sh
 
 STAFF_SIZES = 11 13 14 16 18 20 23 26
 BRACES = a b c d e f g h i
@@ -127,45 +125,36 @@ $(outdir)/emmentaler-brace.otf-table: $(foreach x,
a b c d e f g h i,$(outdir)/f
 #
 # 2. are not included with teTeX
 #
-$(outdir)/%.lisp: $(outdir)/%.log $(outdir)/%.tfm
-       $(call ly_progress,Making,$@,< log)
+$(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc:
$(outdir)/%.log $(outdir)/%.tfm
+       $(call ly_progress,Making,$(outdir)/$*.lisp,< log)
        $(buildscript-dir)/mf-to-table \
                --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
                --lisp=$(outdir)/$(<F:.log=.lisp) \
                --outdir=$(outdir) \
                --enc $(outdir)/$(<F:.log=.enc) \
                $<
-       touch $(outdir)/$(<F:.log=.otf-gtable) \
-               $(outdir)/$(<F:.log=.lisp) \
-               $(outdir)/$(<F:.log=.enc)
-
-$(outdir)/%.otf-gtable $(outdir)/%.enc: $(outdir)/%.lisp
-
-$(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
-       $(call ly_progress,Making,$@,)
-       cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
-       touch $(outdir)/emmentaler-%.svg $(outdir)/emmentaler-%.woff
$(outdir)/emmentaler-%.otf
 
-$(outdir)/emmentaler-%.svg $(outdir)/emmentaler-%.woff:
$(outdir)/emmentaler-%.otf
+$(outdir)/emmentaler-%.otf $(outdir)/emmentaler-%.svg
$(outdir)/emmentaler-%.woff: \
+       $(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
+       $(call ly_progress,Making,$(outdir)/emmentaler-$*.otf,)
+       cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
 
-$(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 \
-                       $(outdir)/emmentaler-brace.subfonts
+$(outdir)/emmentaler-brace.otf $(outdir)/emmentaler-brace.svg
$(outdir)/emmentaler-brace.woff: \
+       $(outdir)/emmentaler-brace.pe \
+       $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
+       $(outdir)/emmentaler-brace.otf-table \
+       $(outdir)/emmentaler-brace.otf-gtable \
+       $(outdir)/emmentaler-brace.subfonts
        $(call ly_progress,Making,$@,)
        cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
-       touch $(outdir)/emmentaler-brace.svg
$(outdir)/emmentaler-brace.woff $(outdir)/emmentaler-brace.otf
-
-$(outdir)/emmentaler-brace.svg $(outdir)/emmentaler-brace.woff:
$(outdir)/emmentaler-brace.otf
 
 default: tree-regen \
         $(outdir)/fonts.conf
diff --git a/mf/invoke-mf2pt1.sh b/mf/invoke-mf2pt1.sh
index 58d71ae01c..f57f379048 100755
--- a/mf/invoke-mf2pt1.sh
+++ b/mf/invoke-mf2pt1.sh
@@ -34,9 +34,6 @@ ${mf2pt1} --rounding=0.0001 \
 echo -n "$target : " > ${name}.dep
 grep '^INPUT.*mf$' ${name}.fls | sed "s|INPUT||;s|${srcdir}/||" | tr -d
'\n' >> ${name}.dep
 
-# Touch all to have the same timestamp.
-touch *.pfb *.tfm *.log *.dep
-
 mv *.pfb *.tfm *.log *.dep ..
 cd ..
 rm -rf ${tmp}


https://codereview.appspot.com/553700043/diff/575830048/mf/GNUmakefile
File mf/GNUmakefile (right):

https://codereview.appspot.com/553700043/diff/575830048/mf/GNUmakefile#newcode39
mf/GNUmakefile:39: $(outdir)/%.tfm $(outdir)/%.log: $(outdir)/%.pfb
This doesn't work for me: After a 'make clean' / deleting the build
directory and re-running configure, I get the following:
make: *** No rule to make target 'out/emmentaler-11.otf', needed by
'tree-regen'.  Stop.

I traced this back to the following not working for a clean out/
directory:
make: *** No rule to make target 'out/feta11.log'.  Stop.

The reason is that the marked line only declares dependencies of the
%.log files, but contains no rule that make could execute.

https://codereview.appspot.com/553700043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]