1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-02-28 17:31:52 -05:00

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>
This commit is contained in:
Henning Garus 2008-08-15 00:42:23 +02:00 committed by Dan McGee
parent 4b183bf9a9
commit ec928faad3
3 changed files with 29 additions and 1 deletions

View File

@ -348,6 +348,7 @@ doc/Makefile
etc/Makefile etc/Makefile
po/Makefile.in po/Makefile.in
pactest/Makefile pactest/Makefile
pactest/tests/Makefile
contrib/Makefile contrib/Makefile
Makefile Makefile
]) ])

View File

@ -1,3 +1,5 @@
SUBDIRS = tests
check_SCRIPTS = \ check_SCRIPTS = \
pactest.py \ pactest.py \
pmdb.py \ pmdb.py \
@ -7,7 +9,6 @@ check_SCRIPTS = \
pmrule.py \ pmrule.py \
pmtest.py \ pmtest.py \
util.py \ util.py \
$(wildcard tests/*.py) \
vercmptest.sh vercmptest.sh
noinst_SCRIPTS = $(check_SCRIPTS) noinst_SCRIPTS = $(check_SCRIPTS)

26
pactest/tests/Makefile.am Normal file
View File

@ -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: