1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-17 14:55:07 -05:00
pacman/contrib/Makefile.am
Dave Reisner 3294039a00 contrib/paclog-pkglist: rework as bash wrapping awk
Avoid some pain in awk's limited handling of command line arguments by
wrapping this in a Bash script. We also default to
@localstatedir@/log/pacman.log when no args are specified, meaning that
-h or --help is required to get the help message.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18 10:34:56 -05:00

62 lines
1.2 KiB
Makefile

OURSCRIPTS = \
bacman \
pacdiff \
paclist \
paclog-pkglist \
pacscripts \
pacsearch
OURFILES = \
bash_completion \
zsh_completion
EXTRA_DIST = \
PKGBUILD.vim \
bacman.in \
bash_completion.in \
paclog-pkglist.in \
pacdiff.in \
paclist.in \
pacscripts.in \
pacsearch.in \
vimprojects \
zsh_completion.in \
README
# Files that should be removed, but which Automake does not know.
MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp
edit = sed \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e '1s|!/bin/bash|!$(BASH_SHELL)|g'
$(OURSCRIPTS): Makefile
@echo ' ' GEN $@;
@rm -f $@ $@.tmp
@$(edit) $(srcdir)/$@.in >$@.tmp
@chmod +x $@.tmp
@chmod a-w $@.tmp
@mv $@.tmp $@
$(OURFILES): Makefile
@echo ' ' GEN $@;
@rm -f $@ $@.tmp
@$(edit) $(srcdir)/$@.in >$@.tmp
@chmod a-w $@.tmp
@mv $@.tmp $@
all-am: $(OURSCRIPTS) $(OURFILES)
bacman: $(srcdir)/bacman.in
bash_completion: $(srcdir)/bash_completion.in
pacdiff: $(srcdir)/pacdiff.in
paclist: $(srcdir)/paclist.in
paclog-pkglist: $(srcdir)/paclog-pkglist.in
pacscripts: $(srcdir)/pacscripts.in
pacsearch: $(srcdir)/pacsearch.in
pactree: $(srcdir)/pactree.in
zsh_completion: $(srcdir)/zsh_completion.in
# vim:set ts=2 sw=2 noet: