summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
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