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