Makefile.am 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at https://curl.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. ###########################################################################
  22. EXTRA_DIST = updatemanpages.pl coverage.sh completion.pl firefox-db2pem.sh \
  23. checksrc.pl mk-ca-bundle.pl
  24. ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
  25. FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
  26. PERL = @PERL@
  27. ZSH_COMPLETION_FUNCTION_FILENAME = _curl
  28. FISH_COMPLETION_FUNCTION_FILENAME = curl.fish
  29. CLEANFILES = $(ZSH_COMPLETION_FUNCTION_FILENAME) $(FISH_COMPLETION_FUNCTION_FILENAME)
  30. all-local: $(ZSH_COMPLETION_FUNCTION_FILENAME) $(FISH_COMPLETION_FUNCTION_FILENAME)
  31. $(ZSH_COMPLETION_FUNCTION_FILENAME): completion.pl
  32. if CROSSCOMPILING
  33. @echo "NOTICE: we can't generate zsh completion when cross-compiling!"
  34. else # if not cross-compiling:
  35. @if ! test -x "$(PERL)"; then echo "No perl: can't install completion.pl"; exit 0; fi
  36. $(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell zsh > $@
  37. endif
  38. $(FISH_COMPLETION_FUNCTION_FILENAME): completion.pl
  39. if CROSSCOMPILING
  40. @echo "NOTICE: we can't generate fish completion when cross-compiling!"
  41. else # if not cross-compiling:
  42. @if ! test -x "$(PERL)"; then echo "No perl: can't install completion.pl"; exit 0; fi
  43. $(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell fish > $@
  44. endif
  45. install-data-local:
  46. if CROSSCOMPILING
  47. @echo "NOTICE: we can't install zsh completion when cross-compiling!"
  48. else # if not cross-compiling:
  49. $(MKDIR_P) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)
  50. $(MKDIR_P) $(DESTDIR)$(FISH_FUNCTIONS_DIR)
  51. $(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)/$(ZSH_COMPLETION_FUNCTION_FILENAME)
  52. $(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(FISH_FUNCTIONS_DIR)/$(FISH_COMPLETION_FUNCTION_FILENAME)
  53. endif