1 # enforce that all scripts have a --help and --version option
2 AUTOMAKE_OPTIONS = std-options
36 # Files that should be removed, but which Automake does not know.
37 MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp
40 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
41 REAL_PACKAGE_VERSION = $(GIT_VERSION)
43 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
47 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
48 -e 's|@localstatedir[@]|$(localstatedir)|g' \
49 -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
50 -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
51 -e '1s|!/bin/bash|!$(BASH_SHELL)|g'
53 $(OURSCRIPTS): Makefile
54 $(AM_V_at)$(RM) $@ $@.tmp
55 $(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
56 $(AM_V_at)chmod +x,a-w $@.tmp
57 $(AM_V_at)mv $@.tmp $@
60 $(AM_V_at)$(RM) $@ $@.tmp
61 $(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
62 $(AM_V_at)chmod a-w $@.tmp
63 $(AM_V_at)mv $@.tmp $@
65 all-am: $(OURSCRIPTS) $(OURFILES)
68 $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
69 $(INSTALL_DATA) bash_completion $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman
70 $(MKDIR_P) $(DESTDIR)$(datarootdir)/zsh/site-functions/
71 $(INSTALL_DATA) zsh_completion $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman
74 $(RM) $(DESTDIR)$(sysconfdir)/bash_completion.d/pacman
75 $(RM) $(DESTDIR)$(datarootdir)/zsh/site-functions/_pacman
77 bacman: $(srcdir)/bacman.in
78 bash_completion: $(srcdir)/bash_completion.in
79 paccache: $(srcdir)/paccache.in
80 pacdiff: $(srcdir)/pacdiff.in
81 paclist: $(srcdir)/paclist.in
82 paclog-pkglist: $(srcdir)/paclog-pkglist.in
83 pacscripts: $(srcdir)/pacscripts.in
84 pacsearch: $(srcdir)/pacsearch.in
85 pacsysclean: $(srcdir)/pacsysclean.in
86 pactree: $(srcdir)/pactree.in
87 zsh_completion: $(srcdir)/zsh_completion.in
89 # vim:set ts=2 sw=2 noet: