aboutsummaryrefslogtreecommitdiff
path: root/paludis/qa/Makefile.am.m4
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/qa/Makefile.am.m4')
-rw-r--r--paludis/qa/Makefile.am.m454
1 files changed, 54 insertions, 0 deletions
diff --git a/paludis/qa/Makefile.am.m4 b/paludis/qa/Makefile.am.m4
new file mode 100644
index 000000000..0f4b37ca3
--- /dev/null
+++ b/paludis/qa/Makefile.am.m4
@@ -0,0 +1,54 @@
+ifdef(`__gnu__',`',`errprint(`This is not GNU m4...
+')m4exit(1)') include(`misc/generated-file.txt')
+
+dnl vim: set ft=m4 noet :
+
+define(`filelist', `')dnl
+define(`testlist', `')dnl
+define(`testscriptlist', `')dnl
+define(`addtest', `define(`testlist', testlist `$1_TEST')dnl
+$1_TEST_SOURCES = $1_TEST.cc
+$1_TEST_LDADD = test_extras.o $(top_builddir)/test/libtest.a \
+ $(top_builddir)/test/libpaludis.a libpaludisqa.a
+$1_TEST_CXXFLAGS = -I$(top_srcdir)
+')dnl
+define(`addtestscript', `define(`testscriptlist', testscriptlist `$1_TEST_setup.sh $1_TEST_cleanup.sh')')dnl
+define(`addhh', `define(`filelist', filelist `$1.hh')')dnl
+define(`addcc', `define(`filelist', filelist `$1.cc')')dnl
+define(`addimpl', `define(`filelist', filelist `$1-impl.hh')')dnl
+define(`addthis', `dnl
+ifelse(`$2', `hh', `addhh(`$1')', `')dnl
+ifelse(`$2', `cc', `addcc(`$1')', `')dnl
+ifelse(`$2', `impl', `addimpl(`$1')', `')dnl
+ifelse(`$2', `test', `addtest(`$1')', `')dnl
+ifelse(`$2', `testscript', `addtestscript(`$1')', `')')dnl
+define(`add', `addthis(`$1',`$2')addthis(`$1',`$3')addthis(`$1',`$4')dnl
+addthis(`$1',`$5')addthis(`$1',`$6')')dnl
+
+include(`paludis/qa/files.m4')
+
+CLEANFILES = *~
+MAINTAINERCLEANFILES = Makefile.in Makefile.am qa.hh
+AM_CXXFLAGS = -I$(top_srcdir)
+DEFS=-DSYSCONFDIR=\"$(sysconfdir)\" -DLIBEXECDIR=\"$(libexecdir)\"
+EXTRA_DIST = Makefile.am.m4 files.m4 qa.hh.m4
+
+libpaludisqa_a_SOURCES = filelist
+
+TESTS = testlist
+
+TESTS_ENVIRONMENT = env \
+ PALUDIS_EBUILD_DIR="$(srcdir)/ebuild/" \
+ TEST_SCRIPT_DIR="$(srcdir)/" \
+ $(SHELL) $(top_srcdir)/test/run_test.sh
+
+check_PROGRAMS = $(TESTS)
+check_SCRIPTS = testscriptlist
+noinst_LIBRARIES = libpaludisqa.a
+
+Makefile.am : Makefile.am.m4 files.m4
+ $(top_srcdir)/misc/do_m4.bash Makefile.am
+
+qa.hh : qa.hh.m4 files.m4
+ $(top_srcdir)/misc/do_m4.bash qa.hh
+