mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
[cmake] fix selection of manual pages for installation
This commit is contained in:
parent
a6d2b06529
commit
b819f38e83
1 changed files with 11 additions and 9 deletions
|
@ -36,19 +36,18 @@ SET(extra_confdir
|
||||||
${datadir}/fish/vendor_conf.d
|
${datadir}/fish/vendor_conf.d
|
||||||
CACHE STRING "Path for extra configuration")
|
CACHE STRING "Path for extra configuration")
|
||||||
|
|
||||||
# These are the man pages that go in system manpath.
|
# These are the man pages that go in system manpath; all manpages go in the fish-specific manpath.
|
||||||
SET(MANUALS ${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish.1
|
SET(MANUALS ${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish.1
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish_indent.1
|
${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish_indent.1
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish_key_reader.1)
|
${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish_key_reader.1)
|
||||||
|
|
||||||
# These are the manpages that go in fish-specific manpath.
|
# Determine which man page we don't want to install.
|
||||||
FILE(GLOB HELP_MANPAGES share/man/man1/*.1)
|
|
||||||
|
|
||||||
# Determine which man pages we don't want to install.
|
|
||||||
# On OS X, don't install a man page for open, since we defeat fish's open
|
# On OS X, don't install a man page for open, since we defeat fish's open
|
||||||
# function on OS X.
|
# function on OS X.
|
||||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
LIST(REMOVE_ITEM HELP_MANPAGES share/man/man1/open.1)
|
SET(CONDEMNED_PAGE "open.1")
|
||||||
|
ELSE()
|
||||||
|
SET(CONDEMNED_PAGE "none")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Define a function to help us create directories.
|
# Define a function to help us create directories.
|
||||||
|
@ -160,10 +159,13 @@ INSTALL(DIRECTORY share/groff
|
||||||
DESTINATION ${rel_datadir}/fish)
|
DESTINATION ${rel_datadir}/fish)
|
||||||
|
|
||||||
# $v test -z "$(wildcard share/man/man1/*.1)" || $(INSTALL) -m 644 $(filter-out $(addprefix share/man/man1/, $(CONDEMNED_PAGES)), $(wildcard share/man/man1/*.1)) $(DESTDIR)$(datadir)/fish/man/man1/
|
# $v test -z "$(wildcard share/man/man1/*.1)" || $(INSTALL) -m 644 $(filter-out $(addprefix share/man/man1/, $(CONDEMNED_PAGES)), $(wildcard share/man/man1/*.1)) $(DESTDIR)$(datadir)/fish/man/man1/
|
||||||
# CONDEMNED_PAGES is managed by the LIST() function after the glob
|
# CONDEMNED_PAGE is managed by the conditional above
|
||||||
# Building the man pages is optional: if doxygen isn't installed, they're not built
|
# Building the man pages is optional: if doxygen isn't installed, they're not built
|
||||||
INSTALL(FILES ${HELP_MANPAGES}
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/
|
||||||
DESTINATION ${rel_datadir}/fish/man/man1)
|
DESTINATION ${rel_datadir}/fish/man/man1
|
||||||
|
FILES_MATCHING
|
||||||
|
PATTERN "*.1"
|
||||||
|
PATTERN ${CONDEMNED_PAGE} EXCLUDE)
|
||||||
|
|
||||||
# @echo "Installing helper tools";
|
# @echo "Installing helper tools";
|
||||||
# $v $(INSTALL) -m 755 share/tools/*.py $(DESTDIR)$(datadir)/fish/tools/
|
# $v $(INSTALL) -m 755 share/tools/*.py $(DESTDIR)$(datadir)/fish/tools/
|
||||||
|
|
Loading…
Reference in a new issue