diff options
author | Allan McRae <allan@archlinux.org> | 2016-10-09 22:21:45 +1000 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-05-08 23:27:44 -0400 |
commit | 722be61ca8f700d15376bbc6c2c20b0aac27b2e0 (patch) | |
tree | bec3ce8d7ade6b6c8b7e14a4d81e71dabcf1839b | |
parent | 5de2ad13fd8983210638b7c3ba3e39285e35446d (diff) | |
download | pacman-722be61ca8f700d15376bbc6c2c20b0aac27b2e0.tar.xz |
Move bash/zsh completion out of contrib
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit 2e76c184aac74c4848fa5ee092fe54c9954c4054)
-rw-r--r-- | contrib/Makefile.am | 22 | ||||
-rw-r--r-- | scripts/Makefile.am | 29 | ||||
-rw-r--r-- | scripts/completion/.gitignore | 2 | ||||
-rw-r--r-- | scripts/completion/bash_completion.in (renamed from contrib/bash_completion.in) | 0 | ||||
-rw-r--r-- | scripts/completion/zsh_completion.in (renamed from contrib/zsh_completion.in) | 0 |
5 files changed, 32 insertions, 21 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index e34b43e2..629632a3 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -22,14 +22,9 @@ OURSCRIPTS = \ $(BASHSCRIPTS) \ $(OTHERSCRIPTS) -OURFILES = \ - bash_completion \ - zsh_completion - EXTRA_DIST = \ PKGBUILD.vim \ bacman.sh.in \ - bash_completion.in \ checkupdates.sh.in \ paccache.sh.in \ paclog-pkglist.sh.in \ @@ -40,11 +35,10 @@ EXTRA_DIST = \ rankmirrors.sh.in \ updpkgsums.sh.in \ vimprojects \ - zsh_completion.in \ README # Files that should be removed, but which Automake does not know. -MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp +MOSTLYCLEANFILES = $(OURSCRIPTS) *.tmp if USE_GIT_VERSION GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//') @@ -79,20 +73,9 @@ $(OURFILES): Makefile $(AM_V_at)chmod a-w $@.tmp $(AM_V_at)mv $@.tmp $@ -all-am: $(OURSCRIPTS) $(OURFILES) - -install-data-local: - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/ - $(INSTALL_DATA) bash_completion $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman - $(MKDIR_P) $(DESTDIR)$(datarootdir)/zsh/site-functions/ - $(INSTALL_DATA) zsh_completion $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman - -uninstall-local: - $(RM) $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman - $(RM) $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman +all-am: $(OURSCRIPTS) bacman: $(srcdir)/bacman.sh.in -bash_completion: $(srcdir)/bash_completion.in checkupdates: $(srcdir)/checkupdates.sh.in paccache: $(srcdir)/paccache.sh.in $(top_srcdir)/scripts/library/parseopts.sh $(top_srcdir)/scripts/library/size_to_human.sh pacdiff: $(srcdir)/pacdiff.sh.in @@ -102,6 +85,5 @@ pacscripts: $(srcdir)/pacscripts.sh.in pacsearch: $(srcdir)/pacsearch.in rankmirrors: $(srcdir)/rankmirrors.sh.in updpkgsums: $(srcdir)/updpkgsums.sh.in -zsh_completion: $(srcdir)/zsh_completion.in # vim:set noet: diff --git a/scripts/Makefile.am b/scripts/Makefile.am index d660c0b9..fbaab36c 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -28,6 +28,7 @@ EXTRA_DIST = \ pacman-optimize.sh.in \ pkgdelta.sh.in \ repo-add.sh.in \ + $(COMPLETION_DIST) \ $(LIBRARY) \ $(LIBMAKEPKG_DIST) @@ -99,8 +100,15 @@ LIBMAKEPKG_DIST = \ $(LIBMAKEPKG) \ $(addsuffix .in, $(LIBMAKEPKG_IN)) +COMPLETION_IN = \ + completion/bash_completion \ + completion/zsh_completion + +COMPLETION_DIST = \ + $(addsuffix .in, $(COMPLETION_IN)) + # Files that should be removed, but which Automake does not know. -MOSTLYCLEANFILES = $(bin_SCRIPTS) $(LIBMAKEPKG_IN) +MOSTLYCLEANFILES = $(bin_SCRIPTS) $(LIBMAKEPKG_IN) $(COMPLETION_IN) clean-local: $(AM_V_at)$(RM) -r .lib @@ -154,6 +162,14 @@ $(LIBMAKEPKG_IN): %: %.in Makefile $(AM_V_at)chmod a-w $@ @$(BASH_SHELL) -O extglob -n $@ +$(COMPLETION_IN): %: %.in Makefile + $(AM_V_at)$(RM) $@ + $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@ + $(AM_V_at)chmod a-w $@ + +all-am: $(COMPLETION_IN) + makepkg: \ $(srcdir)/makepkg.sh.in \ $(srcdir)/makepkg-wrapper.sh.in \ @@ -214,6 +230,16 @@ makepkg-wrapper: \ $(AM_V_at)chmod +x,a-w $@ $(AM_V_at)$(LN_S) makepkg-wrapper makepkg +install-data-local: + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/ + $(INSTALL_DATA) completion/bash_completion $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman + $(MKDIR_P) $(DESTDIR)$(datarootdir)/zsh/site-functions/ + $(INSTALL_DATA) completion/zsh_completion $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman + +uninstall-local: + $(RM) $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman + $(RM) $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman + install-exec-hook: cd $(DESTDIR)$(bindir) && \ $(RM) makepkg makepkg-wrapper @@ -248,4 +274,5 @@ uninstall-hook: $(RM) -r $(DESTDIR)$(libmakepkgdir)/$$dir; \ done + # vim:set noet: diff --git a/scripts/completion/.gitignore b/scripts/completion/.gitignore new file mode 100644 index 00000000..881bfd14 --- /dev/null +++ b/scripts/completion/.gitignore @@ -0,0 +1,2 @@ +bash_completion +zsh_completion diff --git a/contrib/bash_completion.in b/scripts/completion/bash_completion.in index 06963c42..06963c42 100644 --- a/contrib/bash_completion.in +++ b/scripts/completion/bash_completion.in diff --git a/contrib/zsh_completion.in b/scripts/completion/zsh_completion.in index f74fa297..f74fa297 100644 --- a/contrib/zsh_completion.in +++ b/scripts/completion/zsh_completion.in |