Makefile: use recursively expanded variable for the list of manpages

Restores the installation of manual pages when running `make install`
without running `make` first, a bug introduced with 417255fc.

Closes #3813.
This commit is contained in:
David Adam 2017-02-05 13:27:48 +08:00
parent 8339e28cfe
commit 41a49b014a

View file

@ -181,7 +181,7 @@ PROGRAMS := fish fish_indent fish_key_reader
# Manual pages to install # Manual pages to install
# #
MANUALS := $(addsuffix .1, $(addprefix share/man/man1/, $(PROGRAMS))) MANUALS := $(addsuffix .1, $(addprefix share/man/man1/, $(PROGRAMS)))
HELP_MANPAGES := $(wildcard share/man/man1/*.1) HELP_MANPAGES = $(wildcard share/man/man1/*.1)
# Determine which man pages we don't want to install # 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
@ -190,7 +190,8 @@ HELP_MANPAGES := $(wildcard share/man/man1/*.1)
# tarball includes this page, we need to skip it in the Makefile too (see # tarball includes this page, we need to skip it in the Makefile too (see
# https://github.com/fish-shell/fish-shell/issues/2561). # https://github.com/fish-shell/fish-shell/issues/2561).
ifeq ($(shell uname), Darwin) ifeq ($(shell uname), Darwin)
HELP_MANPAGES := $(filter-out share/man/man1/open.1, $(HELP_MANPAGES)) CONDEMNED_PAGES := open.1
HELP_MANPAGES = $(filter-out share/man/man1/open.1, $(wildcard share/man/man1/*.1))
endif endif
# #
@ -682,7 +683,7 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
$v $(INSTALL) -m 644 $(FUNCTIONS_DIR_FILES:%='%') $(DESTDIR)$(datadir)/fish/functions/ $v $(INSTALL) -m 644 $(FUNCTIONS_DIR_FILES:%='%') $(DESTDIR)$(datadir)/fish/functions/
@echo "Installing $(bo)man pages$(sgr0)"; @echo "Installing $(bo)man pages$(sgr0)";
$v $(INSTALL) -m 644 share/groff/* $(DESTDIR)$(datadir)/fish/groff/ $v $(INSTALL) -m 644 share/groff/* $(DESTDIR)$(datadir)/fish/groff/
$v test -z "$(HELP_MANPAGES)" || $(INSTALL) -m 644 $(HELP_MANPAGES) $(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/
@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/
$v $(INSTALL) -m 644 share/tools/web_config/*.* $(DESTDIR)$(datadir)/fish/tools/web_config/ $v $(INSTALL) -m 644 share/tools/web_config/*.* $(DESTDIR)$(datadir)/fish/tools/web_config/