Merge branch 'build-enhancements'
[profile/ivi/clutter.git] / Makefile.am
1 NULL =
2
3 SUBDIRS = build clutter tests po
4
5 if BUILD_GTK_DOC
6 SUBDIRS += doc
7 endif
8
9 DIST_SUBDIRS = build clutter tests doc po
10
11 ACLOCAL_AMFLAGS = -I build/autotools
12
13 pcfiles = \
14         clutter-$(CLUTTER_API_VERSION).pc \
15         clutter-$(CLUTTER_FLAVOUR)-$(CLUTTER_API_VERSION).pc \
16         $(NULL)
17
18 # clutter-<major>.<minor>.pc - for generic dependencies
19 clutter-$(CLUTTER_API_VERSION).pc: clutter.pc
20         @cp $< $@
21
22 # clutter-<flavour>-<major>.<minor>.pc - for backend-specific dependencies
23 clutter-$(CLUTTER_FLAVOUR)-$(CLUTTER_API_VERSION).pc: clutter.pc
24         @cp $< $@
25
26 .PHONY: test-report full-report
27 test-report full-report:
28         $(MAKE) -C tests/conform $(@)
29
30 pkgconfig_DATA = $(pcfiles)
31 pkgconfigdir   = $(libdir)/pkgconfig
32
33 DEFAULT_FLAVOUR = @CLUTTER_FLAVOUR@
34
35 EXTRA_DIST =                    \
36         ChangeLog.SVN           \
37         clutter.pc.in           \
38         HACKING                 \
39         HACKING.backends        \
40         CODING_STYLE
41
42 CLEANFILES = $(pcfiles)
43
44 DISTCLEANFILES =
45
46 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags
47
48 # Extra clean files so that maintainer-clean removes *everything*
49 MAINTAINERCLEANFILES = \
50         aclocal.m4 \
51         compile \
52         config.guess \
53         config.h.in \
54         config.sub \
55         configure \
56         depcomp \
57         gtk-doc.make \
58         install-sh \
59         ltmain.sh \
60         Makefile.in \
61         missing \
62         $(NULL)
63
64 MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
65
66 PREV_RELEASE=$(CLUTTER_MAJOR_VERSION).$$(echo "$(CLUTTER_MINOR_VERSION)-1" | bc)
67
68 CHANGELOGS = ChangeLog
69
70 changelogs:
71         @$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
72
73 dist-hook: changelogs
74         changelogs="$(CHANGELOGS)"; \
75         for changelog in $$changelogs; \
76         do \
77                 cp -f $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
78                 cp -f $$changelog $(distdir)/; \
79         done
80
81 $(srcdir)/ChangeLog:
82         @if test -d "$(top_srcdir)/.git"; \
83         then \
84                 to=""; \
85                 from="$(PREV_RELEASE)"; \
86                 echo Creating $@ && \
87                 ( echo '# Generated by configure.  Do no edit.'; echo; \
88                 $(top_srcdir)/missing --run perl $(top_srcdir)/build/gen-changelog.pl $$from.0..$$to ) > $@ ; \
89         else \
90                 echo A git checkout is required to generate $@; \
91         fi
92
93 .PHONY: changelogs ChangeLog $(srcdir)/ChangeLog