gbranden pushed a commit to branch master
in repository groff.

commit 3824d54c8be52d895c58d1535ca3640338a84ce7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Aug 7 04:42:22 2025 -0500

    [ms]: Generate "ms.ms" document from "ms.ms.in".
    
    This way we can embed groff's version string in it.
    
    * doc/ms.ms: Rename this...
    * doc/ms.ms.in: ...to this.
    
    * doc/doc.am (DOCFILES_INST): Drop "doc/ms.ms".
    
      (DOCFILES_NOINST): Add "doc/ms.ms.in".
    
      (GENERATEDDOCFILES): Add "doc/ms.ms".
    
      (SUFFIXES): Add "ms.in" and ".ms", in that order, duplicating the
      dubious, nonstandard, but apparently portable and effective make(1)
      trick we use for our me(7) manuals.
    
      (.ms.in.ms): New suffix rule creates "ms.ms" from "ms.ms.in".
    
      (doc/ms.ps): Revise rule to look for prerequisite in the build instead
      of the source directory.
---
 ChangeLog               | 17 +++++++++++++++++
 doc/doc.am              | 16 +++++++++++-----
 doc/{ms.ms => ms.ms.in} |  0
 3 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b23a8e3b9..1842cf087 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2025-08-07  G. Branden Robinson <[email protected]>
+
+       [ms]: Generate "ms.ms" document from "ms.ms.in".  This way we
+       can embed groff's version string in it.
+
+       * doc/ms.ms: Rename this...
+       * doc/ms.ms.in: ...to this.
+       * doc/doc.am (DOCFILES_INST): Drop "doc/ms.ms".
+       (DOCFILES_NOINST): Add "doc/ms.ms.in".
+       (GENERATEDDOCFILES): Add "doc/ms.ms".
+       (SUFFIXES): Add "ms.in" and ".ms", in that order, duplicating
+       the dubious, nonstandard, but apparently portable and effective
+       make(1) trick we use for our me(7) manuals.
+       (.ms.in.ms): New suffix rule creates "ms.ms" from "ms.ms.in".
+       (doc/ms.ps): Revise rule to look for prerequisite in the build
+       instead of the source directory.
+
 2025-08-07  G. Branden Robinson <[email protected]>
 
        * tmac/s.tmac ([initialization], pg@top): Alter placement of
diff --git a/doc/doc.am b/doc/doc.am
index d90813e3f..c276ecf06 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -54,18 +54,19 @@ DOC_GMP_COVER_PAGE = doc/groff-man-pages-cover.groff
 # Files located in the source tree
 DOCFILES_INST = \
   doc/me-revisions \
-  doc/ms.ms \
   doc/pic.ms
 DOCFILES_NOINST = \
   doc/groff-man-pages-cover.groff.in \
   doc/meintro.me.in \
   doc/meintro_fr.me.in \
-  doc/meref.me.in
+  doc/meref.me.in \
+  doc/ms.ms.in
 # Files that undergo a transformation prior to groff processing
 GENERATEDDOCFILES = \
   doc/meintro.me \
   doc/meintro_fr.me \
-  doc/meref.me
+  doc/meref.me \
+  doc/ms.ms
 # Files generated in the build tree
 if USE_GROHTML
 PROCESSEDDOCFILES_HTML = \
@@ -367,9 +368,14 @@ doc/meintro_fr.ps: doc/meintro_fr.me preconv tbl
        $(GROFF_V)$(MKDIR_P) `dirname $@` \
        && $(DOC_GROFF) -K utf8 -t -Tps -me -mfr $< >$@
 
-doc/ms.ps: $(doc_srcdir)/ms.ms $(TMAC_PACKAGE_MS) eqn pic tbl
+SUFFIXES += .ms.in .ms
+.ms.in.ms:
+       $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
+       && $(DOC_SED) $< >$@
+
+doc/ms.ps: doc/ms.ms $(TMAC_PACKAGE_MS) eqn pic tbl
        $(GROFF_V)$(MKDIR_P) `dirname $@` \
-       && $(DOC_GROFF) -pet -Tps -ms $(doc_srcdir)/ms.ms >$@
+       && $(DOC_GROFF) -pet -Tps -ms doc/ms.ms >$@
 
 doc/pic.ps: $(doc_srcdir)/pic.ms $(TMAC_PACKAGE_MS) eqn pic tbl
        $(GROFF_V)$(MKDIR_P) `dirname $@` \
diff --git a/doc/ms.ms b/doc/ms.ms.in
similarity index 100%
rename from doc/ms.ms
rename to doc/ms.ms.in

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to