2003-10-14 Havoc Pennington <hp@redhat.com>
[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_MCS
16    MONO_SUBDIR=mono
17 endif
18
19 if HAVE_PYTHON
20    PYTHON_SUBDIR=python
21 endif
22
23 ## really we should require gcj/mcs/python also but since they are 
24 ## annoying to install, we don't for now
25 dist-local:
26         if test -z "$(QT_SUBDIR)" || test -z "$(GLIB_SUBDIR)" ; then            \
27                 echo "You have to build with Qt and GLib to make dist" ;        \
28         fi 
29
30 SUBDIRS=dbus bus doc $(GLIB_SUBDIR) $(GCJ_SUBDIR) $(MONO_SUBDIR) $(QT_SUBDIR) $(PYTHON_SUBDIR) test tools
31
32 pkgconfigdir = $(libdir)/pkgconfig
33 pkgconfig_DATA = dbus-1.pc $(GLIB_PC)
34
35 DISTCLEANFILES =                \
36         dbus-1.pc               \
37         $(GLIB_PC)
38
39 EXTRA_DIST =                    \
40         HACKING                 \
41         dbus-1.pc.in            \
42         dbus-glib-1.pc.in
43
44 all-local: Doxyfile
45
46 if DBUS_GCOV_ENABLED
47 clean-gcov:
48         find -name "*.da" -o -name "*.gcov" | xargs rm || true
49
50 ## .PHONY so it always rebuilds it
51 .PHONY: coverage-report.txt
52 coverage-report.txt:
53         GCOV_FILES=`find dbus bus $(GLIB_SUBDIR) $(QT_SUBDIR) -name "*.bbg"` ;          \
54         C_FILES= ;                                                                      \
55         for F in $$GCOV_FILES; do                                                       \
56                 C=`echo $$F | sed -e 's/.bbg/.c/g'` ;                                   \
57                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                                 \
58                 if test -e $$DA ; then                                                  \
59                         C_FILES="$$C_FILES $$C" ;                                       \
60                 fi ;                                                                    \
61         done ;                                                                          \
62         echo $$C_FILES ;                                                                \
63         $(top_builddir)/test/decode-gcov --report $$C_FILES > coverage-report.txt
64
65 check-coverage: clean-gcov all check coverage-report.txt
66         cat coverage-report.txt
67
68 else
69 coverage-report.txt:
70         echo "Need to reconfigure with --enable-gcov"
71
72 check-coverage:
73         echo "Need to reconfigure with --enable-gcov"
74
75 endif