groff-commit
[Top][All Lists]
Advanced

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

[groff] 29/35: [eqn]: Improve build modularity.


From: G. Branden Robinson
Subject: [groff] 29/35: [eqn]: Improve build modularity.
Date: Tue, 10 Dec 2024 16:35:37 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit a05a05472252dedaa250fc0fdb98d67159a5cf9c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Dec 9 03:26:12 2024 -0600

    [eqn]: Improve build modularity.
    
    * tmac/tmac.am (TMACNORMALFILES): Stop shipping "eqnrc" here...
    
    * src/preproc/eqn/eqn.am: ...in favor of defining appropriate
      module-specific Automake variables/make(1) macros here.
    
    * tmac/tmac.am (uninstall_tmac_hook): Ignore failure of `rmdir` to
      remove `$(DESTDIR)/$(tmacdir)`.  Multiple Automake files place things
      there, and we might be racing with them.
    
    * src/preproc/eqn/eqn.am (uninstall_eqn_hook): Attempt to remove
      `$(DESTDIR)/$(tmacdir)` directory, ignoring failure, in case we just
      removed the last thing in it.
    
    Strictly, "eqnrc" is not a "troff macro file" as implied by "tmac", but
    we have long put other things that aren't macro files in tmac, like
    hyphenation pattern (and exception) files.  We can move such stuff if it
    ever pinches.
---
 ChangeLog              | 16 ++++++++++++++++
 src/preproc/eqn/eqn.am |  9 ++++++++-
 tmac/tmac.am           | 10 ++++------
 3 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e19decbe2..bcc3862e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-12-09  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [eqn]: Improve build modularity.
+
+       * tmac/tmac.am (TMACNORMALFILES): Stop shipping "eqnrc" here...
+       * src/preproc/eqn/eqn.am: ...in favor of defining appropriate
+       module-specific Automake variables/make(1) macros here.
+
+       * tmac/tmac.am (uninstall_tmac_hook): Ignore failure of `rmdir`
+       to remove `$(DESTDIR)/$(tmacdir)`.  Multiple Automake files
+       place things there, and we might be racing with them.
+
+       * src/preproc/eqn/eqn.am (uninstall_eqn_hook): Attempt to remove
+       `$(DESTDIR)/$(tmacdir)` directory, ignoring failure, in case we
+       just removed the last thing in it.
+
 2024-12-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/utils/afmtodit/afmtodit.pl: Use $0 in the usage message
diff --git a/src/preproc/eqn/eqn.am b/src/preproc/eqn/eqn.am
index b0ff41036..daa64d2cc 100644
--- a/src/preproc/eqn/eqn.am
+++ b/src/preproc/eqn/eqn.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+# Copyright (C) 2014-2024 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -42,6 +42,10 @@ eqn_SOURCES = \
   src/preproc/eqn/pbox.h \
   src/preproc/eqn/eqn.h
 
+EQNTMACFILES = tmac/eqnrc
+eqntmacdir = $(tmacdir)
+dist_eqntmac_DATA = $(EQNTMACFILES)
+
 PREFIXMAN1 += src/preproc/eqn/eqn.1 src/preproc/eqn/neqn.1
 EXTRA_DIST += \
   src/preproc/eqn/TODO \
@@ -72,6 +76,9 @@ eqn_TESTS = \
 TESTS += $(eqn_TESTS)
 EXTRA_DIST += $(eqn_TESTS)
 
+uninstall_groffdirs: uninstall_eqn_hook
+uninstall_eqn_hook:
+       -rmdir $(DESTDIR)$(tmacdir)
 
 # Local Variables:
 # fill-column: 72
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 8a8da7e5c..b1edee837 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -1,4 +1,4 @@
-# Copyright (C) 1989-2020 Free Software Foundation, Inc.
+# Copyright (C) 1989-2024 Free Software Foundation, Inc.
 #      Written by James Clark <jjc@jclark.com>
 #      Automake migration by Bertrand Garrigues
 #        <bertrand.garrigues@laposte.net>
@@ -30,6 +30,7 @@ man7_MANS += \
   tmac/groff_trace.7 \
   tmac/groff_www.7
 
+# See dist_tmac_DATA below regarding "an.tmac" and "s.tmac".
 TMACNORMALFILES = \
   tmac/man.tmac \
   tmac/mandoc.tmac \
@@ -71,7 +72,6 @@ TMACNORMALFILES = \
   tmac/europs.tmac \
   tmac/composite.tmac \
   tmac/fallbacks.tmac \
-  tmac/eqnrc \
   tmac/refer.tmac \
   tmac/refer-me.tmac \
   tmac/refer-ms.tmac \
@@ -380,13 +380,11 @@ uninstall_tmac_hook:
        fi
        if test -d $(DESTDIR)$(mdocdir); then \
          rmdir $(DESTDIR)$(mdocdir); \
-       fi
-       if test -d $(DESTDIR)$(tmacdir); then \
-         rmdir $(DESTDIR)$(tmacdir); \
-       fi
+       fi; \
        if test -d $(DESTDIR)$(localtmacdir); then \
          rmdir $(DESTDIR)$(localtmacdir); \
        fi
+       -rmdir $(DESTDIR)$(tmacdir)
 
 # Define convenience macros for in-tree documents to depend on.  Don't
 # use these above.



reply via email to

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