[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 31/35: [mm]: Stop installing empty macro files.
From: |
G. Branden Robinson |
Subject: |
[groff] 31/35: [mm]: Stop installing empty macro files. |
Date: |
Fri, 16 Jul 2021 20:39:48 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 62a5f6b87ccc69ba5c6df32b087f58eaa131d55f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jul 17 08:30:17 2021 +1000
[mm]: Stop installing empty macro files.
* contrib/mm/mm.am: Delete variable `MMLOCALE`.
(install_mm): Delete `for` loop that touches the files.
(uninstall_mm): Delete `for` loop that deletes the files.
* contrib/mm/m.tmac: Update initializtion.
- Load the `\*[@country]_locale` file with `msoquiet` instead of
`mso`.
- Add version check to require groff 1.23 or later, since the
`msoquiet` request is now being used.
- Move "include guard" to follow the compatibility mode and groff
version checks. Remove its `do` prefix.
* contrib/mm/groff_mm.7.man (Localization): Migrate topic into its own
subsection and update discussion.
Fixes <https://savannah.gnu.org/bugs/?60700>.
---
contrib/mm/ChangeLog | 23 ++++++++++++++++++++++-
contrib/mm/groff_mm.7.man | 38 +++++++++++++++++++++++---------------
contrib/mm/m.tmac | 16 +++++++++++++---
contrib/mm/mm.am | 16 +---------------
4 files changed, 59 insertions(+), 34 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index b869d4f..cb8a815 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,5 +1,24 @@
2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+ Stop installing empty macro files.
+
+ * mm.am: Delete variable `MMLOCALE`.
+ (install_mm): Delete `for` loop that touches the files.
+ (uninstall_mm): Delete `for` loop that deletes the files.
+ * m.tmac: Update initializtion.
+ - Load the `\*[@country]_locale` file with `msoquiet` instead
+ of `mso`.
+ - Add version check to require groff 1.23 or later, since
+ the `msoquiet` request is now being used.
+ - Move "include guard" to follow the compatibility mode and
+ groff version checks. Remove its `do` prefix.
+ * groff_mm.7.man (Localization): Migrate topic into its own
+ subsection and update discussion.
+
+ Fixes <https://savannah.gnu.org/bugs/?60700>.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* mm/ms.cov (cov@print-firm): Do nothing if the `cov*firm`
string is not defined. Silences a `mac` warning and prevents
the document date from being incorrectly aligned.
@@ -1130,6 +1149,8 @@ are permitted in any medium without royalty provided the
copyright
notice and this notice are preserved.
Local Variables:
-version-control: never
+fill-column: 72
mode: change-log
+version-control: never
End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 3b35161..fdd7ed0 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -92,15 +92,14 @@ are not implemented.
Cut marks are not supported.
.
.
-.LP
-.I groff mm
-is designed to support easy localization.
+.\" ====================================================================
+.SS Localization
+.\" ====================================================================
.
-Use
-.I m@TMAC_M_PREFIX@mse
-as an example of how to adapt the output format to a national standard.
+.I groff mm
+is designed to be easily localized.
.
-Localized strings are collected in the file
+Strings that can appear in output are collected in the file
.IR @MACRODIR@/ xx .tmac ,
where
.I xx
@@ -108,21 +107,30 @@ is an ISO\~639 two-letter language identifier.
.
For Swedish,
this is
-.I sv.tmac;
+.IR sv.tmac ;
\[lq]sv\[rq],
not
\[lq]se\[rq].
.
.
-.LP
-A file called
-.I locale
-or
+.P
+This package can also be localized by site or territory;
+for example,
+.I @MACRODIR@/@TMAC_M_PREFIX@mse.tmac
+illustrates how to adapt the output to a national standard using its ISO
+3166 territory code.
+.
+Such a package can define an internal string that causes a macro file
+called
.RI territory _locale
-is read after package initialization.
+to be loaded at package initialization.
+.
+If this mechanism is not used,
+a macro file called
+.I locale
+is loaded instead.
.
-It is therefore possible to localize the macros with a different company
-name and so on.
+No diagnostic is produced if these macro files do not exist.
.
.
.\" ====================================================================
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index d357589..d770091 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -27,10 +27,20 @@ Index array!index
..
.if !\n(.g \
. ab groff mm macros require groff extensions; aborting
-.do if d PH .nx
+.
.if \n(.C \
. ab groff mm macros do not work in compatibility mode; aborting
+.
.ds @mm m.tmac\"
+.
+.if (\n[.x]\n[.y] < 123) \{\
+. ds mm-msg \*[@mm]: groff mm macros require groff 1.23 or later,\"
+. as mm-msg " but found groff \n[.x].\n[.y]; aborting\"
+. ab \*[mm-msg]
+.\}
+.
+.if d PH .nx
+.
.mso devtag.tmac
.\" ######## init #######
.\" Contents level [0:14], contents saved if heading level <= Cl
@@ -360,8 +370,8 @@ Index array!index
.\"
.\"---------------------------------------------
.\" set local variables.
-.ie d @country .mso mm/\*[@country]_locale
-.el .mso mm/locale
+.ie d @country .msoquiet mm/\*[@country]_locale
+.el .msoquiet mm/locale
.\"---------------------------------------------
.if \n[D] .tm Groff mm, version \*[RE].
.\" ####### module init ######
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index 4732188..9fe696d 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -48,11 +48,6 @@ MMEXAMPLEFILES=\
mmexampledir=$(exampledir)/mm
dist_mmexample_DATA = $(MMEXAMPLEFILES)
-# Local configuration files with default values.
-MMLOCALE = \
- locale \
- se_locale
-
EXTRA_DIST += \
contrib/mm/ChangeLog \
contrib/mm/examples \
@@ -79,8 +74,7 @@ mmroff: $(mm_srcdir)/mmroff.pl
>$@ \
&& chmod +x $@
-# Special installation rules for m.tmac, mse.tmac, mmse.tmac, mm.tmac
-# and MMLOCALE
+# special installation rules for m.tmac, mse.tmac, mmse.tmac, mm.tmac
install-data-local: install_mm
install_mm:
-test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
@@ -95,19 +89,11 @@ install_mm:
$(mm_srcdir)/mmse.tmac >
$(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
@$(SED) -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
$(mm_srcdir)/mm.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
- @for f in $(MMLOCALE); do \
- test -f $(DESTDIR)$(tmacdir)/mm/$$f \
- || touch $(DESTDIR)$(tmacdir)/mm/$$f; \
- done
uninstall-local: uninstall_mm
uninstall_mm:
if test -d $(DESTDIR)$(mmexampledir); then \
rmdir $(DESTDIR)$(mmexampledir); \
fi
- -for f in $(MMLOCALE); do \
- test -s $(DESTDIR)$(tmacdir)/mm/$$f \
- || $(RM) $(DESTDIR)$(tmacdir)/mm/$$f; \
- done
$(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
$(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
$(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 31/35: [mm]: Stop installing empty macro files.,
G. Branden Robinson <=