Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
@@ -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 manpages
# 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 compdef

# Config options
PROFILE ?= debug
Expand Down Expand Up @@ -496,6 +496,20 @@ else
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) -m 755 $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
endif

# shim files without PROG_PREFIX
install-compat:
# Use bash-completion
# Skip coreutils
mkdir -p $(INSTALLDIR_BIN) $(DESTDIR)$(DATAROOTDIR)/{man/man1,zsh/site-functions,fish/vendor_completions.d}
$(foreach prog, $(HASHSUM_PROGS) $(INSTALLEES), \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)$(prog) $(prog) $(newline) \
)
$(foreach prog, $(HASHSUM_PROGS) $(INSTALLEES), \
@echo ".so man1/$(PROG_PREFIX)$(prog).1" > $(DESTDIR)$(DATAROOTDIR)/man/man1/$(prog).1 $(newline) \
@echo -e "#compdef $(prog)=$(PROG_PREFIX)$(prog)\n_$(PROG_PREFIX)$(prog)" > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(prog) $(newline) \
@echo "complete -c $(prog) -w $(PROG_PREFIX)$(prog)" > $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(prog).fish $(newline) \
)

uninstall:
ifneq ($(OS),Windows_NT)
rm -f $(DESTDIR)$(LIBSTDBUF_DIR)/libstdbuf*
Expand Down
Loading