[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 11/12: [troff]: Build more robustly.
From: |
G. Branden Robinson |
Subject: |
[groff] 11/12: [troff]: Build more robustly. |
Date: |
Thu, 21 Oct 2021 07:07:44 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 2a2dab789692510cb65db76f10d0d3a1dc90725e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 21 21:27:10 2021 +1100
[troff]: Build more robustly.
* src/roff/troff/troff.am: Build more robustly.
(src/roff/troff/majorminor.cpp): Drop progress-reporting `echo` in
favor of prefixing final rule command with `$(AM_V_GEN)`. Prefix
earlier rule commands with `$(AM_V_at)`. Use `printf` instead of
`echo` to build the file, and create a temporary file at first so that
we don't race with the compiler on parallelized builds.
Also tweak legal notice formatting.
---
ChangeLog | 10 ++++++++++
src/roff/troff/troff.am | 20 +++++++++++---------
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0750fcd..f5a4fcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2021-10-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+ * src/roff/troff/troff.am: Build more robustly.
+ (src/roff/troff/majorminor.cpp): Drop progress-reporting `echo`
+ in favor of prefixing final rule command with `$(AM_V_GEN)`.
+ Prefix earlier rule commands with `$(AM_V_at)`. Use `printf`
+ instead of `echo` to build the file, and create a temporary file
+ at first so that we don't race with the compiler on parallelized
+ builds.
+
+2021-10-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* src/preproc/eqn/eqn.am (neqn): Simplify: drop removal of
target prior to overwriting it; any system we can build groff on
should have a shell that implements the clobbering semantics of
diff --git a/src/roff/troff/troff.am b/src/roff/troff/troff.am
index 0266542..42ac7fa 100644
--- a/src/roff/troff/troff.am
+++ b/src/roff/troff/troff.am
@@ -4,11 +4,11 @@
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
-# Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
#
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
@@ -50,11 +50,13 @@ src/roff/troff/input.$(OBJEXT): defs.h
CLEANFILES += src/roff/troff/majorminor.cpp
src/roff/troff/majorminor.cpp: $(top_srcdir)/.version
- @echo Making $@
- @$(RM) $@
- @echo const char \*major_version = \"$(MAJOR_VERSION)\"\; >$@
- @echo const char \*minor_version = \"$(MINOR_VERSION)\"\; >>$@
- @echo const char \*revision = \"$(REVISION)\"\; >>$@
+ $(AM_V_at)printf 'const char *major_version = "%s";\n' \
+ $(MAJOR_VERSION) > $@.tmp
+ $(AM_V_at)printf 'const char *minor_version = "%s";\n' \
+ $(MINOR_VERSION) >> $@.tmp
+ $(AM_V_at)printf 'const char *revision = "%s";\n' \
+ $(REVISION) >> $@.tmp
+ $(AM_V_GEN)mv $@.tmp $@
# Local Variables:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 11/12: [troff]: Build more robustly.,
G. Branden Robinson <=