@@ -197,9 +197,11 @@ endef
197197################################################################################
198198# Create man pages for jmod to pick up. There should be a one-to-one
199199# relationship between executables and man pages (even if this is not always
200- # the case), so piggyback man page generation on the launcher compilation.
200+ # the case), so piggyback man page generation on the launcher compilation. This
201+ # file may be included from other places as well, so only process man pages
202+ # when called from <module>/Launcher.gmk.
201203
202- ifeq ($(call isTargetOsType, unix), true)
204+ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX) , true+Launcher )
203205 # Only build manpages on unix systems.
204206 # We assume all our man pages should reside in section 1.
205207
@@ -243,9 +245,9 @@ ifeq ($(call isTargetOsType, unix), true)
243245 FILTER := $(PANDOC_TROFF_MANPAGE_FILTER), \
244246 POST_PROCESS := $(MAN_POST_PROCESS), \
245247 REPLACEMENTS := \
246- @@COPYRIGHT_YEAR@@ => $(COPYRIGHT_YEAR) ; \
247- @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
248- @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
248+ @@COPYRIGHT_YEAR@@ => $(COPYRIGHT_YEAR) ; \
249+ @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
250+ @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
249251 EXTRA_DEPS := $(PANDOC_TROFF_MANPAGE_FILTER) \
250252 $(PANDOC_TROFF_MANPAGE_FILTER_SOURCE), \
251253 ))
0 commit comments