Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Garus <henning.garus@googlemail.com>2008-08-15 00:42:23 +0200
committerDan McGee <dan@archlinux.org>2008-08-23 18:00:37 -0500
commitec928faad350e2aad957256fb47cb10277990738 (patch)
tree239422936544a983a72a072e93c97d9e9a553b89
parent4b183bf9a9702b63cb8b031887d0f6bd38e538e3 (diff)
Add autotools magic for pactests
Added a Makefile.am for the pactest/tests dir. This is a blatant ripoff of scripts/Makefile.am, which replaces predefined expressions in NAME.py.in pactests with configure variables. This can be used to write pactests which consider compile time options. Signed-off-by: Henning Garus <henning.garus@gmail.com> [Dan: autotools are tough, make a few adjustments for correctness] Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--configure.ac1
-rw-r--r--pactest/Makefile.am3
-rw-r--r--pactest/tests/Makefile.am26
3 files changed, 29 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 20aa1807..87abc1f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -348,6 +348,7 @@ doc/Makefile
etc/Makefile
po/Makefile.in
pactest/Makefile
+pactest/tests/Makefile
contrib/Makefile
Makefile
])
diff --git a/pactest/Makefile.am b/pactest/Makefile.am
index ce611f78..64f9a22e 100644
--- a/pactest/Makefile.am
+++ b/pactest/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = tests
+
check_SCRIPTS = \
pactest.py \
pmdb.py \
@@ -7,7 +9,6 @@ check_SCRIPTS = \
pmrule.py \
pmtest.py \
util.py \
- $(wildcard tests/*.py) \
vercmptest.sh
noinst_SCRIPTS = $(check_SCRIPTS)
diff --git a/pactest/tests/Makefile.am b/pactest/tests/Makefile.am
new file mode 100644
index 00000000..42ca5cbe
--- /dev/null
+++ b/pactest/tests/Makefile.am
@@ -0,0 +1,26 @@
+CONFTESTS = $(patsubst %py.in,%py,$(wildcard *.py.in))
+
+check_SCRIPTS = \
+ $(wildcard *.py) \
+ $(CONFTESTS)
+
+noinst_SCRIPTS = $(check_SCRIPTS)
+
+EXTRA_DIST = $(check_SCRIPTS)
+
+CLEANFILES = $(CONFTESTS)
+
+#### Taken from the autoconf scripts Makefile.am ####
+edit = sed \
+ -e 's|@LIBS[@]|$(LIBS)|g' \
+ -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
+
+
+$(CONFTESTS): Makefile
+ rm -f $@ $@.tmp
+ test -f $(srcdir)/$@.in && $(edit) $(srcdir)/$@.in >$@.tmp || true
+ test -f $@.tmp || false
+ chmod a-w $@.tmp
+ mv $@.tmp $@
+
+# vim:set ts=2 sw=2 noet: