[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/03: [build]: Parameterize X11-related man pages.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/03: [build]: Parameterize X11-related man pages. |
Date: |
Fri, 3 Jun 2022 15:52:09 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 21b21cfc9e4830ee559f20aff270d151c2f1b44c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jun 3 14:04:52 2022 -0500
[build]: Parameterize X11-related man pages.
[build]: Parameterize X11-related man pages, so they don't get
spuriously generated (and not cleaned) when building with X11 support
disabled.
* Makefile.am (.man): Fix logic nit: drop unnecessary removal of target
before clobbering it with sed.
* src/devices/xditview/xditview.am (GXDITVIEW_MAN1): Add new macro,
expanding to nothing if `WITHOUT_X11` and to the target name
otherwise.
(man1_MANS): Append `GXDITVIEW_MAN1` expansion, not a literal.
* src/devices/xditview/xditview.am (XTOTROFF_MAN1): Add new macro,
expanding to nothing if `WITHOUT_X11` and to the target name
otherwise.
(man1_MANS): Append `XTOTROFF_MAN1` expansion, not a literal.
* doc/doc.am (GROFF_MAN_PAGES1): Append foregoing expansions instead of
literals.
---
ChangeLog | 19 +++++++++++++++++++
Makefile.am | 3 +--
doc/doc.am | 4 ++--
src/devices/xditview/xditview.am | 4 +++-
src/utils/xtotroff/xtotroff.am | 7 +++++--
5 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9f28b2d0..d35b88e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2022-06-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [build]: Parameterize X11-related man pages, so they don't get
+ spuriously generated (and not cleaned) when building with X11
+ support disabled.
+
+ * Makefile.am (.man): Fix logic nit: drop unnecessary removal of
+ target before clobbering it with sed.
+ * src/devices/xditview/xditview.am (GXDITVIEW_MAN1): Add new
+ macro, expanding to nothing if `WITHOUT_X11` and to the target
+ name otherwise.
+ (man1_MANS): Append `GXDITVIEW_MAN1` expansion, not a literal.
+ * src/devices/xditview/xditview.am (XTOTROFF_MAN1): Add new
+ macro, expanding to nothing if `WITHOUT_X11` and to the target
+ name otherwise.
+ (man1_MANS): Append `XTOTROFF_MAN1` expansion, not a literal.
+ * doc/doc.am (GROFF_MAN_PAGES1): Append foregoing expansions
+ instead of literals.
+
2022-06-03 G. Branden Robinson <g.branden.robinson@gmail.com>
* configure.ac: Add `AM_CONDITIONAL`: `HAVE_URW_FONTS`, so our
diff --git a/Makefile.am b/Makefile.am
index eba1309f..f333a45c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -854,8 +854,7 @@ makevarescape=$(top_srcdir)/makevarescape.sed
SUFFIXES += .man
.man:
- $(AM_V_GEN)rm -f $@ \
- && $(MKDIR_P) `dirname $@` \
+ $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
&& LC_ALL=C \
sed -e "s|[@]APPDEFDIR[@]|`echo $(appdefdir) | sed -f
$(makevarescape)`|g" \
-e "s|[@]BINDIR[@]|`echo $(bindir) | sed -f $(makevarescape)`|g" \
diff --git a/doc/doc.am b/doc/doc.am
index 88478361..6a2671ec 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -194,7 +194,7 @@ GROFF_MAN_PAGES1 = \
src/devices/gropdf/gropdf.1 \
src/devices/grops/grops.1 \
src/devices/grotty/grotty.1 \
- src/devices/xditview/gxditview.1 \
+ $(GXDITVIEW_MAN1) \
src/utils/hpftodit/hpftodit.1 \
src/utils/indxbib/indxbib.1 \
src/utils/lkbib/lkbib.1 \
@@ -213,7 +213,7 @@ GROFF_MAN_PAGES1 = \
src/preproc/tbl/tbl.1 \
src/utils/tfmtodit/tfmtodit.1 \
src/roff/troff/troff.1 \
- src/utils/xtotroff/xtotroff.1 \
+ $(XTOTROFF_MAN1) \
contrib/groff_filenames/groff_filenames.5 \
man/groff_font.5 \
man/groff_out.5 \
diff --git a/src/devices/xditview/xditview.am b/src/devices/xditview/xditview.am
index a2d45882..38e3d356 100644
--- a/src/devices/xditview/xditview.am
+++ b/src/devices/xditview/xditview.am
@@ -35,8 +35,10 @@ GXDITVIEWSOURCES = \
src/devices/xditview/Dvi.h
if WITHOUT_X11
+GXDITVIEW_MAN1 =
EXTRA_DIST += $(GXDITVIEWSOURCES)
else
+GXDITVIEW_MAN1 = src/devices/xditview/gxditview.1
xditview_srcdir = $(top_srcdir)/src/devices/xditview
bin_PROGRAMS += gxditview
gxditview_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) -Dlint \
@@ -48,7 +50,7 @@ gxditview_SOURCES = $(GXDITVIEWSOURCES)
nodist_gxditview_SOURCES = $(XDITVIEW_GENHDRS)
CLEANFILES += $(XDITVIEW_GENHDRS)
-man1_MANS += src/devices/xditview/gxditview.1
+man1_MANS += $(GXDITVIEW_MAN1)
# Because we defined gxditview_CPPFLAGS, automake renames all of
# xditview's objects, adding an "gxditview-" prefix.
diff --git a/src/utils/xtotroff/xtotroff.am b/src/utils/xtotroff/xtotroff.am
index 7a1e22bb..734d1434 100644
--- a/src/utils/xtotroff/xtotroff.am
+++ b/src/utils/xtotroff/xtotroff.am
@@ -15,9 +15,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if !WITHOUT_X11
+if WITHOUT_X11
+XTOTROFF_MAN1 =
+else
+XTOTROFF_MAN1 = src/utils/xtotroff/xtotroff.1
bin_PROGRAMS += xtotroff
-man1_MANS += src/utils/xtotroff/xtotroff.1
+man1_MANS += $(XTOTROFF_MAN1)
xtotroff_SOURCES = src/utils/xtotroff/xtotroff.c
XLIBS=$(LIBXUTIL) $(LIBGROFF)
xtotroff_LDADD = libxutil.a libgroff.a $(X_LIBS) $(X_PRE_LIBS) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/03: [build]: Parameterize X11-related man pages.,
G. Branden Robinson <=