summaryrefslogtreecommitdiff
path: root/contrib/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/Makefile.am')
-rw-r--r--contrib/Makefile.am36
1 files changed, 32 insertions, 4 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index c6243b16..55366b47 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,5 +1,4 @@
-EXTRA_DIST = \
- PKGBUILD.vim \
+OURFILES = \
bacman \
bash_completion \
pacdiff \
@@ -7,9 +6,38 @@ EXTRA_DIST = \
pacscripts \
pacsearch \
pactree \
- vimprojects \
wget-xdelta.sh \
- zsh_completion \
+ zsh_completion
+
+EXTRA_DIST = \
+ PKGBUILD.vim \
+ bacman.in \
+ bash_completion.in \
+ pacdiff.in \
+ paclist.in \
+ pacscripts.in \
+ pacsearch.in \
+ pactree.in \
+ vimprojects \
+ wget-xdelta.sh.in \
+ zsh_completion.in \
README
+# Files that should be removed, but which Automake does not know.
+MOSTLYCLEANFILES = $(OURFILES) *.tmp
+
+edit = sed \
+ -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
+ -e 's|@localstatedir[@]|$(localstatedir)|g' \
+ -e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g'
+
+$(OURFILES): Makefile
+ @echo ' ' GEN $@;
+ @rm -f $@ $@.tmp
+ @cp -a $@.in $@.tmp
+ @$(edit) $@.in >$@.tmp
+ @mv $@.tmp $@
+
+all-am: $(OURFILES)
+
# vim:set ts=2 sw=2 noet: