summaryrefslogtreecommitdiffstats
path: root/contrib/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/Makefile.am')
-rw-r--r--contrib/Makefile.am51
1 files changed, 33 insertions, 18 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index a3d2d42b..a325d62a 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -4,15 +4,22 @@ AUTOMAKE_OPTIONS = std-options
bin_SCRIPTS = \
$(OURSCRIPTS)
-OURSCRIPTS = \
+BASHSCRIPTS = \
bacman \
paccache \
pacdiff \
paclist \
paclog-pkglist \
pacscripts \
- pacsearch \
- pacsysclean
+ pacsysclean \
+ rankmirrors
+
+OTHERSCRIPTS = \
+ pacsearch
+
+OURSCRIPTS = \
+ $(BASHSCRIPTS) \
+ $(OTHERSCRIPTS)
OURFILES = \
bash_completion \
@@ -20,15 +27,16 @@ OURFILES = \
EXTRA_DIST = \
PKGBUILD.vim \
- bacman.in \
+ bacman.sh.in \
bash_completion.in \
- paccache.in \
- paclog-pkglist.in \
- pacdiff.in \
- paclist.in \
- pacscripts.in \
+ paccache.sh.in \
+ paclog-pkglist.sh.in \
+ pacdiff.sh.in \
+ paclist.sh.in \
+ pacscripts.sh.in \
pacsearch.in \
- pacsysclean.in \
+ pacsysclean.sh.in \
+ rankmirrors.sh.in
vimprojects \
zsh_completion.in \
README
@@ -50,12 +58,18 @@ edit = sed \
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
-e '1s|!/bin/bash|!$(BASH_SHELL)|g'
-$(OURSCRIPTS): Makefile
+$(OTHERSCRIPTS): Makefile
$(AM_V_at)$(RM) $@ $@.tmp
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
$(AM_V_at)chmod +x,a-w $@.tmp
$(AM_V_at)mv $@.tmp $@
+$(BASHSCRIPTS): Makefile
+ $(AM_V_at)$(RM) $@
+ $(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
+ $(AM_V_at)chmod +x,a-w $@
+ @$(BASH_SHELL) -O extglob -n $@
+
$(OURFILES): Makefile
$(AM_V_at)$(RM) $@ $@.tmp
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
@@ -74,15 +88,16 @@ uninstall-local:
$(RM) $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman
$(RM) $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman
-bacman: $(srcdir)/bacman.in
+bacman: $(srcdir)/bacman.sh.in
bash_completion: $(srcdir)/bash_completion.in
-paccache: $(srcdir)/paccache.in
-pacdiff: $(srcdir)/pacdiff.in
-paclist: $(srcdir)/paclist.in
-paclog-pkglist: $(srcdir)/paclog-pkglist.in
-pacscripts: $(srcdir)/pacscripts.in
+paccache: $(srcdir)/paccache.sh.in $(top_srcdir)/scripts/library/parseopts.sh
+pacdiff: $(srcdir)/pacdiff.sh.in
+paclist: $(srcdir)/paclist.sh.in
+paclog-pkglist: $(srcdir)/paclog-pkglist.sh.in
+pacscripts: $(srcdir)/pacscripts.sh.in
pacsearch: $(srcdir)/pacsearch.in
-pacsysclean: $(srcdir)/pacsysclean.in
+pacsysclean: $(srcdir)/pacsysclean.sh.in
+rankmirrors: $(srcdir)/rankmirrors.sh.in
zsh_completion: $(srcdir)/zsh_completion.in
# vim:set ts=2 sw=2 noet: