mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
Merge pull request #5092 from sylvestre/make
make: split the manpage / completions generation into their target
This commit is contained in:
commit
0f6058a25a
1 changed files with 24 additions and 7 deletions
31
GNUmakefile
31
GNUmakefile
|
@ -1,4 +1,4 @@
|
||||||
# spell-checker:ignore (misc) testsuite runtest findstring (targets) busytest toybox distclean pkgs nextest ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MULTICALL DATAROOTDIR TESTDIR
|
# spell-checker:ignore (misc) testsuite runtest findstring (targets) busytest toybox distclean pkgs nextest ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MULTICALL DATAROOTDIR TESTDIR manpages
|
||||||
|
|
||||||
# Config options
|
# Config options
|
||||||
PROFILE ?= debug
|
PROFILE ?= debug
|
||||||
|
@ -337,7 +337,21 @@ clean:
|
||||||
distclean: clean
|
distclean: clean
|
||||||
$(CARGO) clean $(CARGOFLAGS) && $(CARGO) update $(CARGOFLAGS)
|
$(CARGO) clean $(CARGOFLAGS) && $(CARGO) update $(CARGOFLAGS)
|
||||||
|
|
||||||
install: build
|
manpages: build-coreutils
|
||||||
|
mkdir -p $(BUILDDIR)/man/
|
||||||
|
$(foreach prog, $(INSTALLEES), \
|
||||||
|
$(BUILDDIR)/coreutils manpage $(prog) > $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1; \
|
||||||
|
)
|
||||||
|
|
||||||
|
completions: build-coreutils
|
||||||
|
mkdir -p $(BUILDDIR)/completions/zsh $(BUILDDIR)/completions/bash $(BUILDDIR)/completions/fish
|
||||||
|
$(foreach prog, $(INSTALLEES), \
|
||||||
|
$(BUILDDIR)/coreutils completion $(prog) zsh > $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog); \
|
||||||
|
$(BUILDDIR)/coreutils completion $(prog) bash > $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog); \
|
||||||
|
$(BUILDDIR)/coreutils completion $(prog) fish > $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish; \
|
||||||
|
)
|
||||||
|
|
||||||
|
install: build manpages completions
|
||||||
mkdir -p $(INSTALLDIR_BIN)
|
mkdir -p $(INSTALLDIR_BIN)
|
||||||
ifeq (${MULTICALL}, y)
|
ifeq (${MULTICALL}, y)
|
||||||
$(INSTALL) $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
|
$(INSTALL) $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
|
||||||
|
@ -349,15 +363,18 @@ else
|
||||||
$(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);)
|
$(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);)
|
||||||
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
|
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
|
||||||
endif
|
endif
|
||||||
|
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
|
||||||
|
$(foreach prog, $(INSTALLEES), \
|
||||||
|
$(INSTALL) $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(DESTDIR)$(DATAROOTDIR)/man/man1/; \
|
||||||
|
)
|
||||||
|
|
||||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
|
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
|
||||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
|
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
|
||||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
|
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
|
||||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
|
|
||||||
$(foreach prog, $(INSTALLEES), \
|
$(foreach prog, $(INSTALLEES), \
|
||||||
$(BUILDDIR)/coreutils completion $(prog) zsh > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX)$(prog); \
|
$(INSTALL) $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/; \
|
||||||
$(BUILDDIR)/coreutils completion $(prog) bash > $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX)$(prog); \
|
$(INSTALL) $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/; \
|
||||||
$(BUILDDIR)/coreutils completion $(prog) fish > $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(PROG_PREFIX)$(prog).fish; \
|
$(INSTALL) $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/; \
|
||||||
$(BUILDDIR)/coreutils manpage $(prog) > $(DESTDIR)$(DATAROOTDIR)/man/man1/$(PROG_PREFIX)$(prog).1; \
|
|
||||||
)
|
)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|
Loading…
Reference in a new issue