summaryrefslogtreecommitdiff
path: root/contrib/Makefile.am
diff options
context:
space:
mode:
authorNezmer <git@nezmer.info>2010-10-12 02:23:16 +0300
committerDan McGee <dan@archlinux.org>2010-10-11 20:29:22 -0500
commit05f0a28932c1acab7a9ddb58435d69626dad54da (patch)
tree86b901ee3ba6fc6ba6d7219de38e68d70d092742 /contrib/Makefile.am
parentbce3c8efc7a2d187984aa0e7037307b99c217fd7 (diff)
downloadpacman-05f0a28932c1acab7a9ddb58435d69626dad54da.tar.xz
Use sysconfdir, localstatedir, BASH instead of hardcoded values
This applies to contrib/ files, our scripts, and the documentation. Dan: fix 'make clean' in contrib/ directory. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/Makefile.am')
-rw-r--r--contrib/Makefile.am33
1 files changed, 31 insertions, 2 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index c6243b16..dd0b767c 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = \
+OURFILES = \
PKGBUILD.vim \
bacman \
bash_completion \
@@ -9,7 +9,36 @@ EXTRA_DIST = \
pactree \
vimprojects \
wget-xdelta.sh \
- zsh_completion \
+ zsh_completion
+
+EXTRA_DIST = \
+ PKGBUILD.vim.in \
+ bacman.in \
+ bash_completion.in \
+ pacdiff.in \
+ paclist.in \
+ pacscripts.in \
+ pacsearch.in \
+ pactree.in \
+ vimprojects.in \
+ 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[@]|$(BASH)|g'
+
+$(OURFILES): Makefile
+ @rm -f $@ $@.tmp
+ @cp -a $@.in $@.tmp
+ $(edit) $@.in >$@.tmp
+ @mv $@.tmp $@
+
+all-am: $(OURFILES)
+
# vim:set ts=2 sw=2 noet: