Skip to contentSkip to conversation

Makefile: Add dependencies to font-conversion scripts

PATCH Applied Akira Yokosawa 2 participants 2 messages Oct 20, 2021 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Add dependencies to font-conversion scripts

One might miss the rebuild of .pdf files when a font-conversion script is updated.

Automate the rebuild by writing down such dependencies as make rules.

---
 Makefile         | 4 ++++
 a2ping-rule.mk   | 1 +
 epstopdf-rule.mk | 1 +
 3 files changed, 6 insertions(+)
Makefile +4 -0
index 0702fdb7..6ee849fd 100644
@@ -393,6 +393,7 @@ perfbook-a4.tex:
 
 # Rules related to perfbook_html are removed as of May, 2016
 
+$(EPSSOURCES_FROM_TEX): $(FIXANEPSFONTS) $(FIXFONTS)
 $(EPSSOURCES_FROM_TEX): %.eps: %.tex
 	@echo "$< --> $(suffix $@)"
 	sh utilities/mpostcheck.sh
@@ -400,6 +401,7 @@ $(EPSSOURCES_FROM_TEX): %.eps: %.tex
 	@dvips -Pdownload35 -E $(patsubst %.tex,%.dvi,$<) -o $@ > /dev/null 2>&1
 	@sh $(FIXANEPSFONTS) $@
 
+$(EPSSOURCES_FROM_DOT): $(FIXANEPSFONTS) $(FIXFONTS)
 $(EPSSOURCES_FROM_DOT): %.eps: %.dot
 	@echo "$< --> $(suffix $@)"
 ifndef DOT
@@ -408,6 +410,7 @@ endif
 	@dot -Tps -o $@ $<
 	@sh $(FIXANEPSFONTS) $@
 
+$(EPSSOURCES_FROM_FIG): $(FIXANEPSFONTS) $(FIXFONTS)
 $(EPSSOURCES_FROM_FIG): %.eps: %.fig
 	@echo "$< --> $(suffix $@)"
 ifndef FIG2EPS
@@ -423,6 +426,7 @@ else
   include epstopdf-rule.mk
 endif
 
+$(PDFTARGETS_OF_SVG): $(FIXSVGFONTS)
 $(PDFTARGETS_OF_SVG): %.pdf: %.svg
 	@echo "$< --> $(suffix $@)"
 ifeq ($(STEELFONT),0)
a2ping-rule.mk +1 -0
index 2a312560..5260ec92 100644
@@ -29,6 +29,7 @@ ifdef A2PING
   endif
 endif
 
+$(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): $(FIXANEPSFONTS) $(FIXFONTS)
 $(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): %.pdf: %.eps
 	@echo "$< --> $(suffix $@) (by a2ping)"
 ifndef A2PING
epstopdf-rule.mk +1 -0
index 8e824fbe..4efad17a 100644
@@ -8,6 +8,7 @@ EPSTOPDF := $(shell which epstopdf 2>/dev/null)
 GS_953_OR_LATER := $(shell gs --version | grep -c -E "9\.5[3-9].?")
 GS_OPT=--gsopt=-dPDFSETTINGS=/ebook
 
+$(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): $(FIXFONTS)
 $(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): %.pdf: %.eps
 	@echo "$< --> $(suffix $@)"
 ifndef EPSTOPDF

base-commit: 25705d5d0328cabdc48af567b253f73e027928a1

Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · Akira Yokosawa

One might miss the rebuild of .pdf files when a font-conversion script is updated.

Automate the rebuild by writing down such dependencies as make rules.

Queued and pushed, thank you!

Thanx, Paul

Quoted 71 lines
---
 Makefile         | 4 ++++
 a2ping-rule.mk   | 1 +
 epstopdf-rule.mk | 1 +
 3 files changed, 6 insertions(+)
Makefile +4 -0
index 0702fdb7..6ee849fd 100644
@@ -393,6 +393,7 @@ perfbook-a4.tex:
 
 # Rules related to perfbook_html are removed as of May, 2016
 
+$(EPSSOURCES_FROM_TEX): $(FIXANEPSFONTS) $(FIXFONTS)
 $(EPSSOURCES_FROM_TEX): %.eps: %.tex
 	@echo "$< --> $(suffix $@)"
 	sh utilities/mpostcheck.sh
@@ -400,6 +401,7 @@ $(EPSSOURCES_FROM_TEX): %.eps: %.tex
 	@dvips -Pdownload35 -E $(patsubst %.tex,%.dvi,$<) -o $@ > /dev/null 2>&1
 	@sh $(FIXANEPSFONTS) $@
 
+$(EPSSOURCES_FROM_DOT): $(FIXANEPSFONTS) $(FIXFONTS)
 $(EPSSOURCES_FROM_DOT): %.eps: %.dot
 	@echo "$< --> $(suffix $@)"
 ifndef DOT
@@ -408,6 +410,7 @@ endif
 	@dot -Tps -o $@ $<
 	@sh $(FIXANEPSFONTS) $@
 
+$(EPSSOURCES_FROM_FIG): $(FIXANEPSFONTS) $(FIXFONTS)
 $(EPSSOURCES_FROM_FIG): %.eps: %.fig
 	@echo "$< --> $(suffix $@)"
 ifndef FIG2EPS
@@ -423,6 +426,7 @@ else
   include epstopdf-rule.mk
 endif
 
+$(PDFTARGETS_OF_SVG): $(FIXSVGFONTS)
 $(PDFTARGETS_OF_SVG): %.pdf: %.svg
 	@echo "$< --> $(suffix $@)"
 ifeq ($(STEELFONT),0)
a2ping-rule.mk +1 -0
index 2a312560..5260ec92 100644
@@ -29,6 +29,7 @@ ifdef A2PING
   endif
 endif
 
+$(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): $(FIXANEPSFONTS) $(FIXFONTS)
 $(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): %.pdf: %.eps
 	@echo "$< --> $(suffix $@) (by a2ping)"
 ifndef A2PING
epstopdf-rule.mk +1 -0
index 8e824fbe..4efad17a 100644
@@ -8,6 +8,7 @@ EPSTOPDF := $(shell which epstopdf 2>/dev/null)
 GS_953_OR_LATER := $(shell gs --version | grep -c -E "9\.5[3-9].?")
 GS_OPT=--gsopt=-dPDFSETTINGS=/ebook
 
+$(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): $(FIXFONTS)
 $(PDFTARGETS_OF_GNUPLOT_NEEDFIXFONTS): %.pdf: %.eps
 	@echo "$< --> $(suffix $@)"
 ifndef EPSTOPDF

base-commit: 25705d5d0328cabdc48af567b253f73e027928a1

Signature · 1 line
2.17.1