Build .desktop and .service files correctly
[platform/upstream/gcr.git] / Makefile.decl
1 NULL =
2
3 TEST_ARGS =
4
5 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
6
7 perform-memcheck: $(TEST_PROGS)
8         make -C $(top_builddir)/build all
9         @for test in $(TEST_PROGS); do \
10                 G_SLICE=always-malloc libtool --mode=execute \
11                         valgrind --trace-children=no --gen-suppressions=all \
12                         --suppressions=$(TEST_SUPPRESSIONS) \
13                         --leak-check=full --show-reachable=yes --num-callers=16 \
14                         --quiet --error-exitcode=3 \
15                         $(builddir)/$$test $(TEST_ARGS) || exit 3; \
16         done
17
18 coverage:
19         mkdir -p $(top_builddir)/build/coverage
20         $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
21         $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
22         $(LCOV) --directory . --zerocounters
23         @echo "file://$(abs_top_builddir)/build/coverage/index.html"
24
25 clear-coverage:
26         $(LCOV) --directory . --zerocounters
27
28 V_ASN1 = $(V_ASN1_$(V))
29 V_ASN1_ = $(V_ASN1_$(AM_DEFAULT_VERBOSITY))
30 V_ASN1_0 = @echo "  ASN1  " $@;
31
32 .asn.asn.h:
33         $(V_ASN1) $(ASN1PARSER) -o $@ $< && sed -i 's|#include.*|/* \0 */|' $@
34
35 V_SED = $(V_SED_$(V))
36 V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY))
37 V_SED_0 = @echo "  SED  " $@;
38
39 SED_SUBST = sed \
40         -e 's,[@]datadir[@],$(datadir),g' \
41         -e 's,[@]libexecdir[@],$(libexecdir),g' \
42         -e 's,[@]libdir[@],$(libdir),g' \
43         -e 's,[@]includedir[@],$(includedir),g' \
44         -e 's,[@]datarootdir[@],$(datarootdir),g' \
45         -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
46         -e 's,[@]bindir[@],$(bindir),g' \
47         -e 's,[@]exec_prefix[@],$(exec_prefix),g' \
48         -e 's,[@]prefix[@],$(prefix),g' \
49         -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
50         -e 's,[@]VERSION[@],$(VERSION),g' \
51         $(NULL)
52
53 .desktop.in.in.desktop.in:
54         $(V_SED) $(SED_SUBST) $< > $@
55
56 @INTLTOOL_DESKTOP_RULE@
57
58 .service.in.service:
59         $(V_SED) $(SED_SUBST) $< > $@
60
61 SUFFIXES = .asn .asn.h .desktop.in .desktop.in.in .service .service.in