5548794e6700e0a9003cc283bf363c8235cea2f8
[platform/upstream/dbus.git] / Makefile.am
1
2 if HAVE_GLIB
3     GLIB_SUBDIR=glib
4     GLIB_PC=dbus-glib-1.pc
5 endif
6
7 if HAVE_QT
8    QT_SUBDIR=qt
9 endif
10
11 if DBUS_USE_GCJ
12    GCJ_SUBDIR=gcj
13 endif
14
15 if DBUS_USE_CSC
16    MONO_SUBDIR=mono
17    MONO_PC=dbus-sharp.pc
18 endif
19
20 if HAVE_PYTHON
21    PYTHON_SUBDIR=python
22 endif
23
24 ## really we should require gcj/mcs/python also but since they are 
25 ## annoying to install, we don't for now
26 dist-local:
27         if test -z "$(QT_SUBDIR)" || test -z "$(GLIB_SUBDIR)" ; then            \
28                 echo "You have to build with Qt and GLib to make dist" ;        \
29         fi 
30
31 SUBDIRS=dbus bus doc $(GLIB_SUBDIR) $(GCJ_SUBDIR) $(MONO_SUBDIR) $(QT_SUBDIR) $(PYTHON_SUBDIR) test tools
32
33 pkgconfigdir = $(libdir)/pkgconfig
34 pkgconfig_DATA = dbus-1.pc $(GLIB_PC) $(MONO_PC)
35
36 DISTCLEANFILES =                \
37         dbus-1.pc               \
38         $(GLIB_PC)              \
39         $(MONO_PC)
40
41 EXTRA_DIST =                    \
42         HACKING                 \
43         dbus-1.pc.in            \
44         dbus-glib-1.pc.in       \
45         dbus-sharp.pc.in
46
47 all-local: Doxyfile
48
49 if DBUS_GCOV_ENABLED
50 clean-gcov:
51         find -name "*.da" -o -name "*.gcov" | xargs rm || true
52
53 clean-bbg:
54         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
55
56 GCOV_DIRS=dbus bus $(GLIB_SUBDIR) $(QT_SUBDIR)
57
58 ## .PHONY so it always rebuilds it
59 .PHONY: coverage-report.txt
60 coverage-report.txt:
61         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                             \
62         C_FILES= ;                                                                \
63         for F in $$BBG_FILES ; do                                                 \
64                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;                     \
65                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;                      \
66                 B=`basename $$F .bbg` ;                                           \
67                 D=`dirname $$F` ;                                                 \
68                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                           \
69                 DA_libs=`echo $$D/.libs/$$B/.da` ;                                \
70                 if test -e $$DA || test -e $$DA_libs; then                        \
71                         C_FILES="$$C_FILES $$C" ;                                 \
72                 fi ;                                                              \
73         done ;                                                                    \
74         echo $$C_FILES ;                                                          \
75         $(top_builddir)/test/decode-gcov --report $$C_FILES > coverage-report.txt
76
77 check-coverage: clean-gcov all check coverage-report.txt
78         cat coverage-report.txt
79
80 else
81 coverage-report.txt:
82         echo "Need to reconfigure with --enable-gcov"
83
84 check-coverage:
85         echo "Need to reconfigure with --enable-gcov"
86
87 endif