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 <[EMAIL PROTECTED]>
---
 Makefile.am               |    2 +-
 configure.ac              |    1 +
 pactest/tests/Makefile.am |   19 +++++++++++++++++++
 3 files changed, 21 insertions(+), 1 deletions(-)
 create mode 100644 pactest/tests/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index ea3b0e0..4f2ea83 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = lib/libalpm src/util src/pacman scripts etc po pactest contrib
+SUBDIRS = lib/libalpm src/util src/pacman scripts etc po pactest pactest/tests 
contrib
 if WANT_DOC
 SUBDIRS += doc
 endif
diff --git a/configure.ac b/configure.ac
index 9f4209b..5c09e2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,6 +342,7 @@ doc/Makefile
 etc/Makefile
 po/Makefile.in
 pactest/Makefile
+pactest/tests/Makefile
 contrib/Makefile
 Makefile
 ])
diff --git a/pactest/tests/Makefile.am b/pactest/tests/Makefile.am
new file mode 100644
index 0000000..4590e3c
--- /dev/null
+++ b/pactest/tests/Makefile.am
@@ -0,0 +1,19 @@
+CONFTESTS = $(patsubst %py.in,%py,$(wildcard *.py.in))
+
+noinst_SCRIPTS = $(CONFTESTS)
+
+CLEANFILES = $(CONFTESTS)
+
+edit = sed \
+  -e 's|@[EMAIL PROTECTED]|$(LIBS)|g' \
+  -e 's|@[EMAIL PROTECTED]|Generated from [EMAIL PROTECTED]; do not edit by 
hand.|g'
+
+
+$(CONFTESTS): Makefile
+       rm -f $@ [EMAIL PROTECTED]
+       test -f $(srcdir)/[EMAIL PROTECTED] && $(edit) $(srcdir)/[EMAIL 
PROTECTED] >[EMAIL PROTECTED] || true
+       test -f [EMAIL PROTECTED] || false
+       chmod a-w [EMAIL PROTECTED]
+       mv [EMAIL PROTECTED] $@
+
+# vim:set ts=2 sw=2 noet:
-- 
1.5.6.5

_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to