~seif/zeitgeist/fix-false-payloads

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
SUBDIRS = extra po zeitgeist _zeitgeist doc

INTLTOOL = \
	intltool-extract.in \
	intltool-merge.in \
	intltool-update.in

bin_SCRIPTS = \
	zeitgeist-daemon 

EXTRA_DIST = \
	$(bin_SCRIPTS) \
	$(INTLTOOL) \
	COPYING.GPL \
	COPYRIGHT \
	NEWS \
	zeitgeist-daemon.py \
	zeitgeist-daemon.pc.in

DISTCLEANFILES = \
	intltool-extract \
	intltool-merge \
	intltool-update

CLEANFILES = \
	zeitgeist-daemon 

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = zeitgeist-daemon.pc

zeitgeist-daemon: zeitgeist-daemon.py
	sed \
		-e "s!\/usr\/bin\/env python!$(PYTHON)!" \
		< $< > $@
	chmod +x zeitgeist-daemon
zeitgeist-daemon: Makefile


all-local: zeitgeist-daemon

# Generate ChangeLog
dist-hook:
	@if test -d "$(srcdir)/.bzr"; \
		then \
			echo Creating ChangeLog && \
			( cd "$(top_srcdir)" && \
			  echo '# Generated by Makefile. Do not edit.'; echo; \
			  $(top_srcdir)/missing --run bzr log --gnu-changelog -r1008.. -v ) > ChangeLog.tmp \
			&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
			|| ( rm -f ChangeLog.tmp ; \
			     echo Failed to generate ChangeLog >&2 ); \
	else \
			echo A Bazaar branch is required to generate the ChangeLog >&2; \
	fi

# create API documentation
doc: all
	make -C doc/zeitgeist html
	
.PHONY: doc

# hook into the `make check` command to run the testsuite
# if the testsuite is not available (e.g. in the tarball) do nothing
# but printing a message
check-local:
	@if test -e "test/run-all-tests.py"; \
		then \
			test/run-all-tests.py; \
	else \
		echo "Cannot run the testsuite, tests are not shipped"; \
	fi
	
# do the right thing to start a daemon
#  wrap commandline options
#  * to run the daemon without any datahub, set ZG_NODATAHUB,
#  * to use a certain log level, set ZG_LOGLEVEL=<log-level>
# example:
#  make run ZG_LOGLEVEL=INFO ZG_NODATAHUB=1
ZG_DAEMON_ARGS := $(if $(ZG_LOGLEVEL), --log-level $(ZG_LOGLEVEL),)
ZG_DAEMON_ARGS += $(if $(ZG_NODATAHUB), --no-datahub,)
run: all
	./zeitgeist-daemon $(ZG_DAEMON_ARGS)