groff-commit
[Top][All Lists]
Advanced

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

[groff] 23/40: font/devpdf/devpdf.am: Refactor.


From: G. Branden Robinson
Subject: [groff] 23/40: font/devpdf/devpdf.am: Refactor.
Date: Sat, 12 Nov 2022 14:43:38 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit cc52751acfd3ad7957db714de93475716c3b222c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Nov 11 06:40:29 2022 -0600

    font/devpdf/devpdf.am: Refactor.
    
    * font/devpdf/devpdf.am: Refactor.
    
      (MOSTLYCLEANFILES): Populate macro incrementally, adjacent to the
      targets that build the files to be cleaned.  This will enable cleaner
      refactoring in the future.
    
      (DEFAULT_BASE35_FONTS): Add new macro storing the targets of the
      PostScript Level 2 standard base 35 font descriptions.
    
      (devpdffont_DATA): Populate using `DEFAULT_BASE35_FONTS`.
    
      (URW_BASE35_FONTS): Add new macro, empty if [!HAVE_URW_FONTS]; and
      [HAVE_URW_FONTS] otherwise naming the `U` foundry font description
      counterparts of the `DEFAULT_BASE35_FONTS`.
    
      (devpdffont_DATA): Append `URW_BASE35_FONTS`.
    
      ($(DEFAULT_BASE35_FONTS) $(URW_BASE35_FONTS)): Assert dependency on
      "font/devpdf/download".  This isn't literally true, but BuildFoundries
      generates all of these together.  so if the "font/devpdf/download"
      target rule runs successfully, the font description files named in
      these macro expansions will be generated too.
---
 ChangeLog             | 20 ++++++++++++++++++++
 font/devpdf/devpdf.am | 29 +++++++++++++++++------------
 2 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 29b340e63..eafe06a4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2022-11-11  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * font/devpdf/devpdf.am: Refactor.
+       (MOSTLYCLEANFILES): Populate macro incrementally, adjacent to
+       the targets that build the files to be cleaned.  This will
+       enable cleaner refactoring in the future.
+       (DEFAULT_BASE35_FONTS): Add new macro storing the targets of the
+       PostScript Level 2 standard base 35 font descriptions.
+       (devpdffont_DATA): Populate using `DEFAULT_BASE35_FONTS`.
+       (URW_BASE35_FONTS): Add new macro, empty if [!HAVE_URW_FONTS];
+       and [HAVE_URW_FONTS] otherwise naming the `U` foundry font
+       description counterparts of the `DEFAULT_BASE35_FONTS`.
+       (devpdffont_DATA): Append `URW_BASE35_FONTS`.
+       ($(DEFAULT_BASE35_FONTS) $(URW_BASE35_FONTS)): Assert dependency
+       on "font/devpdf/download".  This isn't literally true, but
+       BuildFoundries generates all of these together, so if the
+       "font/devpdf/download" target rule runs successfully, the font
+       description files named in these macro expansions will be
+       generated too.
+
 2022-11-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [build]: Do more explicit work and less magic for PDF fonts.
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 033e25999..0114d15e0 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -24,16 +24,7 @@ GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
 ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
 MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
 
-MOSTLYCLEANFILES += \
-  font/devpdf/download \
-  font/devpdf/DESC \
-  font/devpdf/Foundry \
-  font/devpdf/util/BuildFoundries
-
-devpdffontdir = $(fontdir)/devpdf
-devpdffont_DATA = \
-  font/devpdf/DESC \
-  font/devpdf/Foundry \
+DEFAULT_BASE35_FONTS = \
   font/devpdf/AB \
   font/devpdf/ABI \
   font/devpdf/AI \
@@ -68,13 +59,18 @@ devpdffont_DATA = \
   font/devpdf/TI \
   font/devpdf/TR \
   font/devpdf/ZCMI \
-  font/devpdf/ZD \
+  font/devpdf/ZD
+
+devpdffontdir = $(fontdir)/devpdf
+devpdffont_DATA = $(DEFAULT_BASE35_FONTS) \
+  font/devpdf/DESC \
+  font/devpdf/Foundry \
   font/devpdf/EURO \
   font/devpdf/freeeuro.afm \
   font/devpdf/freeeuro.pfa
 
 if HAVE_URW_FONTS
-devpdffont_DATA += \
+URW_BASE35_FONTS = \
   font/devpdf/U-AB \
   font/devpdf/U-ABI \
   font/devpdf/U-AI \
@@ -110,6 +106,7 @@ devpdffont_DATA += \
   font/devpdf/U-TR \
   font/devpdf/U-ZCMI \
   font/devpdf/U-ZD
+devpdffont_DATA += $(URW_BASE35_FONTS)
 endif
 
 devpdffontencdir = $(devpdffontdir)/enc
@@ -141,6 +138,7 @@ $(devpdffontmapdata):
          $(top_srcdir)/font/devps/generate/`basename $@` \
          $(top_builddir)/font/devpdf/map
 
+MOSTLYCLEANFILES += font/devpdf/util/BuildFoundries
 font/devpdf/util/BuildFoundries: \
   $(devpdf_srcdir)/util/BuildFoundries.pl $(SH_DEPS_SED_SCRIPT) afmtodit
        $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf/util \
@@ -162,6 +160,7 @@ font/devpdf/util/BuildFoundries: \
           fi \
        && chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries
 
+MOSTLYCLEANFILES += font/devpdf/DESC
 font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
        $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
        && cat $(devpdf_srcdir)/DESC.in \
@@ -188,6 +187,7 @@ font/devpdf/freeeuro.pfa: $(devps_srcdir)/freeeuro.pfa
        $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
        && cp -f $(devps_srcdir)/freeeuro.pfa $@
 
+MOSTLYCLEANFILES += font/devpdf/Foundry
 font/devpdf/Foundry: $(devpdf_srcdir)/Foundry.in
        $(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf/
 if HAVE_URW_FONTS
@@ -198,6 +198,11 @@ else
          $(devpdf_srcdir)/Foundry.in >$@
 endif
 
+# This is kind of a cheat, but works because BuildFoundries produces so
+# many artifacts.
+$(DEFAULT_BASE35_FONTS) $(URW_BASE35_FONTS): font/devpdf/download
+
+MOSTLYCLEANFILES += font/devpdf/download
 font/devpdf/download: $(devpdffontmapdata) font/devpdf/DESC \
   font/devpdf/Foundry font/devpdf/enc/text.enc \
   font/devpdf/util/BuildFoundries



reply via email to

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