mirror of
https://github.com/curl/curl.git
synced 2026-05-30 16:27:29 +03:00
configure: tidy up shell completion rules
- allow generating completions in cross-builds.
Follow-up to d055a01ce9 #16789
- fix warning messages.
- language, quotes, whitespace.
Closes #16836
This commit is contained in:
parent
627e9816ff
commit
795425f765
1 changed files with 10 additions and 18 deletions
|
|
@ -22,9 +22,9 @@
|
|||
#
|
||||
###########################################################################
|
||||
|
||||
EXTRA_DIST = coverage.sh completion.pl firefox-db2pem.sh checksrc.pl \
|
||||
mk-ca-bundle.pl mk-unity.pl schemetable.c cd2nroff nroff2cd cdall cd2cd managen \
|
||||
dmaketgz maketgz release-tools.sh verify-release cmakelint.sh mdlinkcheck
|
||||
EXTRA_DIST = coverage.sh completion.pl firefox-db2pem.sh checksrc.pl \
|
||||
mk-ca-bundle.pl mk-unity.pl schemetable.c cd2nroff nroff2cd cdall cd2cd managen \
|
||||
dmaketgz maketgz release-tools.sh verify-release cmakelint.sh mdlinkcheck
|
||||
|
||||
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
|
||||
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
|
||||
|
|
@ -43,38 +43,30 @@ all-local: $(ZSH_COMPLETION_FUNCTION_FILENAME) $(FISH_COMPLETION_FUNCTION_FILENA
|
|||
|
||||
if USE_ZSH_COMPLETION
|
||||
$(ZSH_COMPLETION_FUNCTION_FILENAME): completion.pl
|
||||
if CROSSCOMPILING
|
||||
@echo "NOTICE: we can't generate zsh completion when cross-compiling!"
|
||||
else # if not cross-compiling:
|
||||
if test -z "$(PERL)"; then echo "No perl: can't install completion script"; else \
|
||||
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell zsh > $@ ; fi
|
||||
endif
|
||||
if test -z "$(PERL)"; then echo 'No perl: cannot generate completion script'; else \
|
||||
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell zsh > $@; fi
|
||||
endif
|
||||
|
||||
if USE_FISH_COMPLETION
|
||||
$(FISH_COMPLETION_FUNCTION_FILENAME): completion.pl
|
||||
if CROSSCOMPILING
|
||||
@echo "NOTICE: we can't generate fish completion when cross-compiling!"
|
||||
else # if not cross-compiling:
|
||||
if test -z "$(PERL)"; then echo "No perl: can't install completion script"; else \
|
||||
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell fish > $@ ; fi
|
||||
endif
|
||||
if test -z "$(PERL)"; then echo 'No perl: cannot generate completion script'; else \
|
||||
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell fish > $@; fi
|
||||
endif
|
||||
|
||||
install-data-local:
|
||||
if CROSSCOMPILING
|
||||
@echo "NOTICE: we can't install completion scripts when cross-compiling!"
|
||||
@echo 'NOTICE: we cannot install completion scripts when cross-compiling'
|
||||
else # if not cross-compiling:
|
||||
if USE_ZSH_COMPLETION
|
||||
if test -n "$(PERL)"; then \
|
||||
$(MKDIR_P) $(DESTDIR)$(ZSH_FUNCTIONS_DIR); \
|
||||
$(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)/$(ZSH_COMPLETION_FUNCTION_FILENAME) ; \
|
||||
$(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)/$(ZSH_COMPLETION_FUNCTION_FILENAME); \
|
||||
fi
|
||||
endif
|
||||
if USE_FISH_COMPLETION
|
||||
if test -n "$(PERL)"; then \
|
||||
$(MKDIR_P) $(DESTDIR)$(FISH_FUNCTIONS_DIR); \
|
||||
$(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(FISH_FUNCTIONS_DIR)/$(FISH_COMPLETION_FUNCTION_FILENAME) ; \
|
||||
$(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(FISH_FUNCTIONS_DIR)/$(FISH_COMPLETION_FUNCTION_FILENAME); \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue