diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-02-27 21:18:19 +1100 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-03-02 20:54:16 +1100 |
commit | 3c82cbbfe5c378f8fc274b93cce28624b19a1b8a (patch) | |
tree | 4ae6cfcad3b6800c438ce255fa057a12e71d259e /font/devX75-12 | |
parent | b225d5e4f48bb1e29589901fe7dbd6e805e8146d (diff) | |
download | groff-git-3c82cbbfe5c378f8fc274b93cce28624b19a1b8a.tar.gz |
Refactor X11 font description generation.
Integrate it with our "new" (post-2014) Automake-based build system.
* src/utils/xtotroff/Makefile.in: Delete relic of old build system.
Also, it had a bug: it generated X11 output device 'DESC' files with a
"unitwidth 10" directive even for the "-12" devices, which is not
correct (the in-tree DESC files we've been shipping for years were
nevertheless correct, apparently fixed by hand by James Clark in groff
1.07 [March 1993]).
* src/utils/xtotroff/xtotroff.am: Define `xtotroff` variable for use by
X11 font description generation targets below.
* font/devX100-12/devX100-12.am [!WITHOUT_X11]:
* font/devX100/devX100.am [!WITHOUT_X11]:
* font/devX75-12/devX75-12.am [!WITHOUT_X11]:
* font/devX75/devX75.am [!WITHOUT_X11]: Define devX*_fontdir variables
here.
* font/devX100-12/devX100-12.am:
* font/devX100/devX100.am:
* font/devX75-12/devX75-12.am:
* font/devX75/devX75.am: Add new (phony) targets, variously named
"devX{100,100_12,75,75_12}-font-descriptions", to generate the
corresponding output device's DESC file and run xtotroff(1) to
generate its font description files. Be sure to set the correct
"unitwidth" for the "-12" devices. Add new dependency-only rule
"maintainer-font-descriptions" depending on these new targets for
convenience (and future expansion to devps and devlj4). Add new
devX*_fontsrcdir variable to distinguish the source directory for the
font description files, and use it in the devX*_font-descriptions
targets.
* FOR-RELEASE: Document existence of "maintainer-font-descriptions" Make
target and when to run it.
Running this target with the aforementioned bug fix, overwriting the
in-tree DESC and font description files using data gathered from a
running X server, results in no changes whatsoever. Say what you will
about X11 core font technology--it's stable.
squash Refactor X11 font description generation.
Diffstat (limited to 'font/devX75-12')
-rw-r--r-- | font/devX75-12/devX75-12.am | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/font/devX75-12/devX75-12.am b/font/devX75-12/devX75-12.am index adbea39f6..057c862f5 100644 --- a/font/devX75-12/devX75-12.am +++ b/font/devX75-12/devX75-12.am @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2020 Free Software Foundation, Inc. +# Copyright (C) 2014-2022 Free Software Foundation, Inc. # # This file is part of 'groff'. # @@ -34,12 +34,29 @@ DEVX7512FONTS = \ font/devX75-12/NB \ font/devX75-12/NBI \ font/devX75-12/S + if !WITHOUT_X11 -devX7512fontdir = $(fontdir)/devX75-12 -devX7512font_DATA = $(DEVX7512FONTS) +devX75_12_fontdir = $(top_builddir)/font/devX75-12 +devX75_12_font_DATA = $(DEVX7512FONTS) endif + EXTRA_DIST += $(DEVX7512FONTS) +# This target generates font descriptions from core X11 font data +# returned by a running X server; these are _not_ normally generated +# during a build, but provided with the groff source distribution. +# +# This maintainer-mode target alters files in the source tree. +maintainer-font-descriptions: devX75-12_font-descriptions +devX75_12_fontsrcdir=$(top_srcdir)/font/devX75-12 +devX75-12_font-descriptions: $(xtotroff) $(xditview_srcdir)/DESC.in \ + $(xditview_srcdir)/FontMap-X11 + $(AM_V_GEN)$(MKDIR_P) $(devX75_12_fontsrcdir) \ + && sed -e 's/res .*/res 75/;s/unitwidth .*/unitwidth 12/' \ + $(xditview_srcdir)/DESC.in >$(devX75_12_fontsrcdir)/DESC \ + && $(xtotroff) -d $(devX75_12_fontsrcdir) -r 75 -s 12 \ + $(xditview_srcdir)/FontMap-X11 + # Local Variables: # mode: makefile-automake |