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