utils: add necessary header and footer to have right calling convention
[platform/upstream/libgsignon-glib.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 AM_DISTCHECK_CONFIGURE_FLAGS = \
3         --enable-gtk-doc \
4         --enable-introspection=yes
5 SUBDIRS = libgsignon-glib docs examples
6
7 if ENABLE_PYTHON
8 SUBDIRS += pygobject
9 endif
10
11 if ENABLE_TESTS
12 SUBDIRS += tests
13 endif
14
15 pkgconfigdir = $(libdir)/pkgconfig
16 pkgconfig_in_files = libgsignon-glib.pc.in
17 pkgconfig_DATA = $(pkgconfig_in_files:.pc.in=.pc)
18
19 dist_noinst_DATA = \
20         $(libgsignondoc_DATA) \
21         m4/introspection.m4
22
23 dist-hook: git-changelog-hook
24         @echo
25         @echo "==== Run 'make update-online-doc' to update online documentation ===="
26         @echo
27
28 git-changelog-hook: Makefile
29         $(AM_V_at)if $(top_srcdir)/build-aux/missing --run git \
30                 --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) log \
31                 --no-merges --date=short --pretty='tformat:%cd  %an  <%ae>%n%n%s%n%n%b' | \
32                 $(SED) -e '/[^  ]/,/^[  ]*$$/ !d' > .ChangeLog.tmp; \
33         then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
34         else rm -f .ChangeLog.tmp; exit 1; fi
35
36 DISTCLEANFILES = \
37         $(pkgconfig_DATA)
38
39 valgrind:
40         cd tests; make valgrind
41
42 EXTRA_DIST = dists tools
43
44 .PHONY:  git-changelog-hook
45
46 update-online-doc:
47         @tar zxf $(PACKAGE)-$(VERSION).tar.gz && \
48         pushd . > /dev/null && \
49         cd .. && \
50         git clone https://code.google.com/p/accounts-sso.gsignon-docs/ ; \
51         cd accounts-sso.gsignon-docs && \
52         git pull ; \
53         mkdir -p $(PACKAGE) && \
54         rm -rf $(PACKAGE)/* && \
55         popd > /dev/null && \
56         cp -rf $(PACKAGE)-$(VERSION)/docs/reference/html/* ../accounts-sso.gsignon-docs/$(PACKAGE)/ && \
57         pushd . > /dev/null && \
58         cd ../accounts-sso.gsignon-docs && \
59         git add $(PACKAGE)/* && \
60         git commit -m "Updated documentation for $(PACKAGE) to version $(VERSION)" && \
61         git push ; \
62         popd > /dev/null && \
63         rm -rf $(PACKAGE)-$(VERSION)
64
65 lcov: check
66         @rm -rf lcov-report
67         @lcov -c --directory libgsignon-glib/ --output-file lcov.output
68         @genhtml lcov.output --output-directory lcov-report
69         @rm lcov.output
70         @echo "Coverage report is in file://$(abs_srcdir)/lcov-report/index.html"