1 # enforce that all scripts have a --help and --version option
2 AUTOMAKE_OPTIONS = std-options
34 paclog-pkglist.sh.in \
46 # Files that should be removed, but which Automake does not know.
47 MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp
50 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
51 REAL_PACKAGE_VERSION = $(GIT_VERSION)
53 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
57 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
58 -e 's|@localstatedir[@]|$(localstatedir)|g' \
59 -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
60 -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
61 -e 's|@SCRIPTNAME[@]|$@|g' \
62 -e '1s|!/bin/bash|!$(BASH_SHELL)|g'
64 $(OTHERSCRIPTS): Makefile
65 $(AM_V_at)$(RM) $@ $@.tmp
66 $(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
67 $(AM_V_at)chmod +x,a-w $@.tmp
68 $(AM_V_at)mv $@.tmp $@
70 $(BASHSCRIPTS): Makefile
72 $(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
73 $(AM_V_at)chmod +x,a-w $@
74 @$(BASH_SHELL) -O extglob -n $@
77 $(AM_V_at)$(RM) $@ $@.tmp
78 $(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
79 $(AM_V_at)chmod a-w $@.tmp
80 $(AM_V_at)mv $@.tmp $@
82 all-am: $(OURSCRIPTS) $(OURFILES)
85 $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
86 $(INSTALL_DATA) bash_completion $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman
87 $(MKDIR_P) $(DESTDIR)$(datarootdir)/zsh/site-functions/
88 $(INSTALL_DATA) zsh_completion $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman
91 $(RM) $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman
92 $(RM) $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman
94 bacman: $(srcdir)/bacman.sh.in
95 bash_completion: $(srcdir)/bash_completion.in
96 paccache: $(srcdir)/paccache.sh.in $(top_srcdir)/scripts/library/parseopts.sh $(top_srcdir)/scripts/library/size_to_human.sh
97 pacdiff: $(srcdir)/pacdiff.sh.in
98 paclist: $(srcdir)/paclist.sh.in
99 paclog-pkglist: $(srcdir)/paclog-pkglist.sh.in
100 pacscripts: $(srcdir)/pacscripts.sh.in
101 pacsearch: $(srcdir)/pacsearch.in
102 pacsysclean: $(srcdir)/pacsysclean.sh.in
103 rankmirrors: $(srcdir)/rankmirrors.sh.in
104 updpkgsums: $(srcdir)/updpkgsums.sh.in
105 zsh_completion: $(srcdir)/zsh_completion.in
107 # vim:set ts=2 sw=2 noet: