summaryrefslogtreecommitdiffstats
path: root/contrib/Makefile.am
blob: 10b03a2f7c837cf5a1698aef949d5e4fcd60f22b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
OURSCRIPTS = \
	bacman \
	paccache \
	pacdiff \
	paclist \
	paclog-pkglist \
	pacscripts \
	pacsearch

OURFILES = \
	bash_completion \
	zsh_completion

EXTRA_DIST = \
	PKGBUILD.vim \
	bacman.in \
	bash_completion.in \
	paccache.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 's|@SIZECMD[@]|$(SIZECMD)|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
paccache: $(srcdir)/paccache.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: