Convert the CPPUnit patch to a library usable with CPPUnit.
[third_party/subunit] / Makefile.am
1 EXTRA_DIST =  \
2         INSTALL \
3         Makefile.am \
4         README \
5         NEWS \
6         c/README \
7         c/check-subunit-0.9.3.patch \
8         c/check-subunit-0.9.5.patch \
9         c/check-subunit-0.9.6.patch \
10         c++/README \
11         c++/cppunit-subunit-1.10.2.patch \
12         perl/subunit-diff \
13         perl/Makefile.PL.in \
14         perl/lib/Subunit/Diff.pm \
15         perl/lib/Subunit.pm \
16         python/subunit/__init__.py \
17         python/subunit/progress_model.py \
18         python/subunit/run.py \
19         python/subunit/tests/TestUtil.py \
20         python/subunit/tests/__init__.py \
21         python/subunit/tests/sample-script.py \
22         python/subunit/tests/sample-two-script.py \
23         python/subunit/tests/test_subunit_filter.py \
24         python/subunit/tests/test_subunit_stats.py \
25         python/subunit/tests/test_subunit_tags.py \
26         python/subunit/tests/test_tap2subunit.py \
27         python/subunit/tests/test_progress_model.py \
28         python/subunit/tests/test_test_protocol.py \
29         python/subunit/tests/test_test_results.py \
30         runtests.py \
31         shell/README \
32         shell/share/subunit.sh \
33         shell/subunit-ui.patch \
34         shell/tests/test_function_output.sh \
35         shell/tests/test_source_library.sh
36
37 ACLOCAL_AMFLAGS = -I m4
38
39 SUBUNIT_CFLAGS = -Wall -Werror -Wextra -Wstrict-prototypes -Wmissing-prototypes \
40         -Wwrite-strings -Wno-variadic-macros -I$(top_srcdir)/c/include
41 AM_CFLAGS = $(SUBUNIT_CFLAGS)
42 SUBUNIT_CXXFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-variadic-macros \
43         -I$(top_srcdir)/c/include
44 AM_CXXFLAGS = $(SUBUNIT_CXXFLAGS)
45
46 include_subunitdir = $(includedir)/subunit
47
48 dist_bin_SCRIPTS = \
49         filters/subunit-filter \
50         filters/subunit-ls \
51         filters/subunit-stats \
52         filters/subunit-tags \
53         filters/subunit2gtk \
54         filters/subunit2junitxml \
55         filters/subunit2pyunit \
56         filters/tap2subunit
57
58 TESTS_ENVIRONMENT = SHELL_SHARE='$(top_srcdir)/shell/share/' PYTHONPATH='$(abs_top_srcdir)/python':${PYTHONPATH} 
59 TESTS = runtests.py $(check_PROGRAMS)
60
61 ## install libsubunit.pc
62 pcdatadir = $(libdir)/pkgconfig
63 pcdata_DATA = \
64         libsubunit.pc \
65         libcppunit_subunit.pc
66
67 pkgpython_PYTHON = \
68         python/subunit/__init__.py \
69         python/subunit/iso8601.py \
70         python/subunit/progress_model.py \
71         python/subunit/run.py \
72         python/subunit/test_results.py
73
74 lib_LTLIBRARIES = libsubunit.la
75 lib_LTLIBRARIES +=  libcppunit_subunit.la
76
77 include_subunit_HEADERS = \
78         c/include/subunit/child.h \
79         c++/SubunitTestProgressListener.h
80
81 check_PROGRAMS = \
82         c/tests/test_child
83
84 check_SCRIPTS = \
85         runtests.py
86
87 libsubunit_la_SOURCES = \
88         c/lib/child.c \
89         c/include/subunit/child.h
90
91 libcppunit_subunit_la_SOURCES = \
92         c++/SubunitTestProgressListener.cpp \
93         c++/SubunitTestProgressListener.h
94
95 tests_LDADD = @CHECK_LIBS@ $(top_builddir)/libsubunit.la
96 c_tests_test_child_CFLAGS = $(SUBUNIT_CFLAGS) @CHECK_CFLAGS@
97 c_tests_test_child_LDADD = $(tests_LDADD)
98
99
100 all-local: perl/Makefile
101         $(MAKE) -C perl all
102
103 check-local: perl/Makefile
104         $(MAKE) -C perl check
105
106 clean-local:
107         find . -name "*.pyc" | xargs -r rm
108         rm -f perl/Makefile
109
110 # Remove perl dir for VPATH builds.
111 distclean-local:
112         -rmdir perl > /dev/null
113         -rm perl/Makefile.PL > /dev/null
114
115 install-exec-local: perl/Makefile
116         $(MAKE) -C perl install
117
118 mostlyclean-local:
119         rm -rf perl/blib
120         rm -rf perl/pm_to_blib
121
122 # 'uninstall' perl files during distcheck
123 uninstall-local:
124         if [ "_inst" = `basename ${prefix}` ]; then \
125           $(MAKE) -C perl uninstall_distcheck; \
126             rm -f "$(DESTDIR)$(bindir)"/subunit-diff; \
127         fi
128
129 # The default for MakeMaker; can be overridden by exporting
130 INSTALLDIRS ?= site
131
132 perl/Makefile: perl/Makefile.PL
133         mkdir -p perl
134         cd perl && perl Makefile.PL INSTALLDIRS=${INSTALLDIRS}
135         -rm perl/Makefile.old > /dev/null