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