License change to BSD/Apache License 2.0.
[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
43 include_subunitdir = $(includedir)/subunit
44
45 dist_bin_SCRIPTS = \
46         filters/subunit-filter \
47         filters/subunit-ls \
48         filters/subunit-stats \
49         filters/subunit-tags \
50         filters/subunit2gtk \
51         filters/subunit2junitxml \
52         filters/subunit2pyunit \
53         filters/tap2subunit
54
55 TESTS_ENVIRONMENT = SHELL_SHARE='$(top_srcdir)/shell/share/' PYTHONPATH='$(abs_top_srcdir)/python':${PYTHONPATH} 
56 TESTS = runtests.py $(check_PROGRAMS)
57
58 ## install libsubunit.pc
59 pcdatadir = $(libdir)/pkgconfig
60 pcdata_DATA = libsubunit.pc
61
62 pkgpython_PYTHON = \
63         python/subunit/__init__.py \
64         python/subunit/iso8601.py \
65         python/subunit/progress_model.py \
66         python/subunit/run.py \
67         python/subunit/test_results.py
68
69 lib_LTLIBRARIES = libsubunit.la
70
71 include_subunit_HEADERS = \
72         c/include/subunit/child.h
73
74 check_PROGRAMS = \
75         c/tests/test_child
76
77 check_SCRIPTS = \
78         runtests.py
79
80 libsubunit_la_SOURCES = \
81         c/lib/child.c \
82         c/include/subunit/child.h
83
84 tests_LDADD = @CHECK_LIBS@ $(top_builddir)/libsubunit.la
85 c_tests_test_child_CFLAGS = $(SUBUNIT_CFLAGS) @CHECK_CFLAGS@
86 c_tests_test_child_LDADD = $(tests_LDADD)
87
88
89 all-local: perl/Makefile
90         $(MAKE) -C perl all
91
92 check-local: perl/Makefile
93         $(MAKE) -C perl check
94
95 clean-local:
96         find . -name "*.pyc" | xargs -r rm
97         rm -f perl/Makefile
98
99 # Remove perl dir for VPATH builds.
100 distclean-local:
101         -rmdir perl > /dev/null
102         -rm perl/Makefile.PL > /dev/null
103
104 install-exec-local: perl/Makefile
105         $(MAKE) -C perl install
106
107 mostlyclean-local:
108         rm -rf perl/blib
109         rm -rf perl/pm_to_blib
110
111 # 'uninstall' perl files during distcheck
112 uninstall-local:
113         if [ "_inst" = `basename ${prefix}` ]; then \
114           $(MAKE) -C perl uninstall_distcheck; \
115             rm -f "$(DESTDIR)$(bindir)"/subunit-diff; \
116         fi
117
118 # The default for MakeMaker; can be overridden by exporting
119 INSTALLDIRS ?= site
120
121 perl/Makefile: perl/Makefile.PL
122         mkdir -p perl
123         cd perl && perl Makefile.PL INSTALLDIRS=${INSTALLDIRS}
124         -rm perl/Makefile.old > /dev/null