summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
authorSimon Legner <Simon.Legner@gmail.com>2019-02-10 22:06:42 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-02 11:31:18 +0100
commite075b2149b5d287b30718b31bee5ba80aba3da94 (patch)
treed61cc8aca0eed5aaaa3aae88aa32e9f8ca85142b /scripts/Makefile.am
parent15cbf8dec68cdd9e5c7fd6807d8f75b1f5b27501 (diff)
downloadcurl-e075b2149b5d287b30718b31bee5ba80aba3da94.tar.gz
scripts/completion.pl: also generate fish completion file
This is the renamed script formerly known as zsh.pl Closes #3545
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r--scripts/Makefile.am22
1 files changed, 17 insertions, 5 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 15c08828c..297b8d29b 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -20,20 +20,30 @@
#
###########################################################################
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
+FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
PERL = @PERL@
ZSH_COMPLETION_FUNCTION_FILENAME = _curl
+FISH_COMPLETION_FUNCTION_FILENAME = curl.fish
-CLEANFILES = $(ZSH_COMPLETION_FUNCTION_FILENAME)
+CLEANFILES = $(ZSH_COMPLETION_FUNCTION_FILENAME) $(FISH_COMPLETION_FUNCTION_FILENAME)
-all-local: $(ZSH_COMPLETION_FUNCTION_FILENAME)
+all-local: $(ZSH_COMPLETION_FUNCTION_FILENAME) $(FISH_COMPLETION_FUNCTION_FILENAME)
-$(ZSH_COMPLETION_FUNCTION_FILENAME): zsh.pl
+$(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 -x "$(PERL)"; then echo "No perl: can't install zsh.pl"; exit 0; fi
- $(PERL) $(srcdir)/zsh.pl $(top_builddir)/src/curl$(EXEEXT) > $@
+ @if ! test -x "$(PERL)"; then echo "No perl: can't install completion.pl"; exit 0; fi
+ $(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell zsh > $@
+endif
+
+$(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 -x "$(PERL)"; then echo "No perl: can't install completion.pl"; exit 0; fi
+ $(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell fish > $@
endif
install-data-local:
@@ -41,5 +51,7 @@ if CROSSCOMPILING
@echo "NOTICE: we can't install zsh completion when cross-compiling!"
else # if not cross-compiling:
$(MKDIR_P) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)
+ $(MKDIR_P) $(DESTDIR)$(FISH_FUNCTIONS_DIR)
$(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)/$(ZSH_COMPLETION_FUNCTION_FILENAME)
+ $(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(FISH_FUNCTIONS_DIR)/$(FISH_COMPLETION_FUNCTION_FILENAME)
endif