[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 25/35: src/utils/afmtodit/afmtodit.am: Simplify.
From: |
G. Branden Robinson |
Subject: |
[groff] 25/35: src/utils/afmtodit/afmtodit.am: Simplify. |
Date: |
Tue, 10 Dec 2024 16:35:36 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 5d519f57b09384010b92bc0a4c4f895524899bb1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Dec 9 02:48:49 2024 -0600
src/utils/afmtodit/afmtodit.am: Simplify.
* src/utils/afmtodit/afmtodit.am: Simplify.
(afmtodit): Drop branch handling the case where the `PERL` macro is
undefined or empty. The groff configuration process has long required
a Perl interpreter to be present, and its absence is a hard error; see
`GROFF_PERL` in "m4/groff.m4".Since construction of the target is an
interruptible multi-step process involving sed(1) and chmod(1), `RM`
the target before constructing it, and favor `$@` expansion over
literally naming the target.
---
ChangeLog | 12 ++++++++++++
src/utils/afmtodit/afmtodit.am | 28 ++++++++++------------------
2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ed34d0121..2a7304025 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-12-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/utils/afmtodit/afmtodit.am: Simplify.
+ (afmtodit): Drop branch handling the case where the `PERL` macro
+ is undefined or empty. The groff configuration process has long
+ required a Perl interpreter to be present, and its absence is a
+ hard error; see `GROFF_PERL` in "m4/groff.m4". Since
+ construction of the target is an interruptible multi-step
+ process involving sed(1) and chmod(1), `RM` the target before
+ constructing it, and favor `$@` expansion over literally naming
+ the target.
+
2024-12-09 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/utils/lkbib/lkbib.cpp (usage): If asked for `--help`,
diff --git a/src/utils/afmtodit/afmtodit.am b/src/utils/afmtodit/afmtodit.am
index fda095d9d..5a4e89b93 100644
--- a/src/utils/afmtodit/afmtodit.am
+++ b/src/utils/afmtodit/afmtodit.am
@@ -1,6 +1,6 @@
# Automake rules for 'src utils afmtodit'
#
-# Copyright (C) 2013-2020 Free Software Foundation, Inc.
+# Copyright (C) 2013-2024 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -30,23 +30,15 @@ EXTRA_DIST += \
src/utils/afmtodit/make-afmtodit-tables
afmtodit: $(afmtodit_srcdir)/afmtodit.pl $(afmtodit_srcdir)/afmtodit.tables
- $(AM_V_GEN)if test -n "$(PERL)"; then \
- sed -e "s|[@]PERL[@]|$(PERL)|" \
- -e "s|[@]VERSION[@]|$(VERSION)|" \
- -e "s|[@]FONTDIR[@]|$(fontdir)|" \
- -e "/[@]afmtodit.tables[@]/ r $(afmtodit_srcdir)/afmtodit.tables"
\
- -e "/[@]afmtodit.tables[@]/ d" \
- $(afmtodit_srcdir)/afmtodit.pl \
- >afmtodit; \
- else \
- sed -e "s|[@]VERSION[@]|$(VERSION)|" \
- -e "s|[@]FONTDIR[@]|$(fontdir)|" \
- -e "/[@]afmtodit.tables[@]/ r $(afmtodit_srcdir)/afmtodit.tables"
\
- -e "/[@]afmtodit.tables[@]/ d" \
- $(afmtodit_srcdir)/afmtodit.pl \
- >afmtodit; \
- fi \
- && chmod +x afmtodit
+ $(AM_V_GEN)$(RM) $@ \
+ && sed -e "s|[@]PERL[@]|$(PERL)|" \
+ -e "s|[@]VERSION[@]|$(VERSION)|" \
+ -e "s|[@]FONTDIR[@]|$(fontdir)|" \
+ -e "/[@]afmtodit.tables[@]/ r
$(afmtodit_srcdir)/afmtodit.tables" \
+ -e "/[@]afmtodit.tables[@]/ d" \
+ $(afmtodit_srcdir)/afmtodit.pl \
+ >$@ \
+ && chmod +x $@
# Local Variables:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 25/35: src/utils/afmtodit/afmtodit.am: Simplify.,
G. Branden Robinson <=