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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
SUBDIRS = data libsyncdaemon nautilus po gsd-plugin docs
# Shut libtoolize up
ACLOCAL_AMFLAGS = -I m4
# PYTHONPATH for local Python scripts
PYTHONPATH="$(SSO_PATH):$(USP_PATH):$(top_builddir):$(top_srcdir)"
# Python packages we want to install
pypackages = \
ubuntuone/api \
ubuntuone/eventlog \
ubuntuone/platform \
ubuntuone/platform/linux \
ubuntuone/platform/windows \
ubuntuone/syncdaemon/fsm \
ubuntuone/syncdaemon \
ubuntuone/u1sync \
ubuntuone
# Install our scripts and extra data here
bin_SCRIPTS = \
bin/ubuntuone-preferences \
bin/ubuntuone-launch \
bin/u1sdtool \
bin/u1sync
libexec_SCRIPTS = \
bin/ubuntuone-syncdaemon
clientdefsdir = $(pythondir)/ubuntuone
clientdefs_in_files = ubuntuone/clientdefs.py.in
clientdefs_DATA = $(clientdefs_in_files:.py.in=.py)
# Don't end up pulling in storage-protocol source as well
pyfiles = $(shell SRCDIR="$(top_srcdir)/ubuntuone"; for i in `find $$SRCDIR -type f -name "*.py"`; do if [ ! -f $$i.in ]; then printf "$$i "; fi; done)
$(clientdefs_DATA): $(clientdefs_in_files) ubuntuone
sed -e 's|\@localedir\@|$(localedir)|g' \
-e 's|\@libexecdir\@|$(libexecdir)|g' \
-e 's|\@GETTEXT_PACKAGE\@|$(GETTEXT_PACKAGE)|g' \
-e 's|\@SSO_APP_NAME\@|$(SSO_APP_NAME)|g' \
-e 's|\@SSO_TC_URL\@|$(SSO_TC_URL)|g' \
-e 's|\@SSO_PING_URL\@|$(SSO_PING_URL)|g' \
-e 's|\@VERSION\@|$(VERSION)|g' < $< > $@
pylintrc: Makefile
if test "x$(builddir)" != "x$(srcdir)"; then \
if [ ! -e pylintrc -a ! -h pylintrc ]; then \
$(LN_S) $(srcdir)/pylintrc; \
fi; \
fi
logging.conf: data/logging.conf.in Makefile
$(MAKE) -C data logging.conf
lint: pylintrc $(clientdefs_DATA) Makefile
PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" \
$(PYTHON) $(srcdir)/contrib/pylint-wrapper
test: logging.conf $(clientdefs_DATA) Makefile
echo "$(PYTHONPATH)"
if test "x$(builddir)" == "x$(srcdir)"; then \
PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/test; \
fi
rm -rf _trial_temp
test-coverage: logging.conf $(clientdefs_DATA) Makefile
if test "x$(builddir)" == "x$(srcdir)"; then \
PYTHONPATH="$(PYTHONPATH)" coverage run $(srcdir)/contrib/test; \
fi
coverage xml
rm -rf _trial_temp
check: lint test Makefile
docs: $(clientdefs_DATA) Makefile
$(mkdir_p) docs
if test "x$(builddir)" != "x$(srcdir)" -a -f "$(srcdir)/docs/syncdaemon_dbus_api.txt"; then \
$(LN_S) "$(top_srcdir)/docs/syncdaemon_dbus_api.txt" "docs/syncdaemon_dbus_api.txt"; \
else \
PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" $(PYTHON) $(srcdir)/contrib/dbus-docs; \
fi
ubuntuone: Makefile
if test "x$(builddir)" != "x$(srcdir)"; then \
$(mkdir_p) ubuntuone; \
$(mkdir_p) tests; \
(cd ubuntuone && $(LNDIR) $(srcdir)/../ubuntuone > /dev/null); \
(cd tests && $(LNDIR) $(srcdir)/../tests > /dev/null); \
fi
all-local: pylintrc $(clientdefs_DATA)
sd_path = ubuntuone/syncdaemon
u1fsfsm: $(srcdir)/ubuntuone/syncdaemon/u1fsfsm.ods
PYTHONPATH=$(PYTHONPATH) \
HAS_OOFFICE="true" \
XDG_CACHE_HOME="$(builddir)/_trial_temp/xdg_cache" \
$(PYTHON) -t $(srcdir)/$(sd_path)/fsm/fsm_parser.py \
-o $(builddir)/$(sd_path)/u1fsfsm.py $<
PYTHONPATH=$(PYTHONPATH) \
HAS_OOFFICE="true" \
XDG_CACHE_HOME="$(builddir)/_trial_temp/xdg_cache" \
$(PYTHON) -t $(srcdir)/$(sd_path)/fsm/fsm.py \
$(srcdir)/$(sd_path)/u1fsfsm.py
install-data-local: $(clientdefs_DATA)
for package in $(pypackages); do \
$(mkdir_p) $(DESTDIR)$(pythondir)/$$package; \
for module in $(top_srcdir)/$$package/*.py; do \
$(install_sh_DATA) $$module $(DESTDIR)$(pythondir)/$$package; \
done; \
done
uninstall-local:
for package in $(pypackages); do \
for module in $(top_srcdir)/$$package/*.py; do \
modname=`basename $$module`; \
rm -f $(DESTDIR)$(pythondir)/$$package/$$modname; \
done; \
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(pythondir)/$$package; \
done
clean-local:
for i in `find $(builddir) -name "*.pyc"`; do \
rm -f $$i; \
done
rm -rf build dist _trial_temp
EXTRA_DIST = \
$(srcdir)/ubuntuone/syncdaemon/u1fsfsm.ods \
$(pyfiles) \
$(clientdefs_in_files) \
COPYING.icons \
HACKING \
bin \
contrib \
tests \
pylintrc
CLEANFILES = \
$(clientdefs_DATA)
MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
config.guess \
config.h.in \
config.sub \
configure \
depcomp \
install-sh \
libtool \
ltmain.sh \
missing \
mkinstalldirs
|