File: Makefile.am

package info (click to toggle)
ceph 10.2.5-6~bpo8+1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 75,544 kB
  • sloc: cpp: 790,884; ansic: 53,544; sh: 26,745; python: 24,230; java: 16,950; asm: 10,148; makefile: 5,521; perl: 2,666; php: 603
file content (321 lines) | stat: -rw-r--r-- 8,536 bytes parent folder | download | duplicates (2)
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
include Makefile-env.am

# a workaround for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18744, this
# bug was fixed in automake 1.15, but automake 1.13 is supported by us.  so
# we can not just require 1.15 using `AM_INIT_AUTOMAKE`
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}

SUBDIRS += ocf java
DIST_SUBDIRS += gmock ocf java

LOCAL_ALL =
LOCAL_CLEAN =
LOCAL_INSTALLDATA =
LOCAL_INSTALLEXEC =

if NO_GIT_VERSION
export NO_VERSION="yes"
endif

# subdirs

include arch/Makefile.am
include auth/Makefile.am
include brag/Makefile.am
include crush/Makefile.am
include kv/Makefile.am
include mon/Makefile.am
include mds/Makefile.am
include os/Makefile.am
include osd/Makefile.am
include erasure-code/Makefile.am
include compressor/Makefile.am
include osdc/Makefile.am
include client/Makefile.am
include global/Makefile.am
include json_spirit/Makefile.am
include log/Makefile.am
include perfglue/Makefile.am
include common/Makefile.am
include msg/Makefile.am
include messages/Makefile.am
include include/Makefile.am
include librados/Makefile.am
include libradosstriper/Makefile.am
include journal/Makefile.am
include librbd/Makefile.am
include rgw/Makefile.am
include cls/Makefile.am
include key_value_store/Makefile.am
include rbd_replay/Makefile.am
include test/Makefile.am
include tools/Makefile.am
include Makefile-rocksdb.am
include Makefile-spdk.am
include tracing/Makefile.am
include pybind/Makefile.am


# shell scripts

editpaths = sed \
	-e 's|@bindir[@]|$(bindir)|g' \
	-e 's|@sbindir[@]|$(sbindir)|g' \
	-e 's|@libdir[@]|$(libdir)|g' \
	-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
	-e 's|@datadir[@]|$(pkgdatadir)|g' \
	-e 's|@prefix[@]|$(prefix)|g' \
	-e 's|@libexecdir[@]|$(libexecdir)|g' \
	-e 's|@@GCOV_PREFIX_STRIP[@][@]|$(GCOV_PREFIX_STRIP)|g'
shell_scripts = ceph-debugpack ceph-post-file ceph-crush-location
$(shell_scripts): Makefile
$(shell_scripts): %: %.in
	rm -f $@ $@.tmp
	$(editpaths) '$(srcdir)/$@.in' >$@.tmp
	chmod +x $@.tmp
	chmod a-w $@.tmp
	mv $@.tmp $@

EXTRA_DIST += $(srcdir)/$(shell_scripts:%=%.in)
CLEANFILES += $(shell_scripts)


# extra bits

EXTRA_DIST += \
	$(srcdir)/vstart.sh \
	$(srcdir)/stop.sh \
	ceph-run \
	$(srcdir)/ceph-osd-prestart.sh \
	$(srcdir)/ceph_common.sh \
	$(srcdir)/init-radosgw \
	$(srcdir)/init-rbdmap \
	$(srcdir)/ceph-clsinfo \
	$(srcdir)/make_version \
	$(srcdir)/.git_version \
	$(srcdir)/ceph-rbdnamer \
	$(srcdir)/tools/ceph-monstore-update-crush.sh \
	$(srcdir)/script/subman \
	$(srcdir)/upstart/ceph-all.conf \
	$(srcdir)/upstart/ceph-disk.conf \
	$(srcdir)/upstart/ceph-mon.conf \
	$(srcdir)/upstart/ceph-mon-all.conf \
	$(srcdir)/upstart/ceph-mon-all-starter.conf \
	$(srcdir)/upstart/ceph-create-keys.conf \
	$(srcdir)/upstart/ceph-osd.conf \
	$(srcdir)/upstart/ceph-osd-all.conf \
	$(srcdir)/upstart/ceph-osd-all-starter.conf \
	$(srcdir)/upstart/ceph-mds.conf \
	$(srcdir)/upstart/ceph-mds-all.conf \
	$(srcdir)/upstart/ceph-mds-all-starter.conf \
	$(srcdir)/upstart/ceph-rbd-mirror.conf \
	$(srcdir)/upstart/ceph-rbd-mirror-all.conf \
	$(srcdir)/upstart/ceph-rbd-mirror-all-starter.conf \
	$(srcdir)/upstart/radosgw.conf \
	$(srcdir)/upstart/radosgw-all.conf \
	$(srcdir)/upstart/radosgw-all-starter.conf \
	$(srcdir)/upstart/rbdmap.conf \
	ceph.in \
	ceph-disk-udev \
	ceph-create-keys \
	ceph-rest-api \
	ceph-crush-location \
	mount.fuse.ceph \
	rbd-replay-many \
	rbdmap \
	etc-rbdmap \
	yasm-wrapper

EXTRA_DIST += \
	CMakeLists.txt \
	unittest_bufferlist.sh


# work around old versions of automake that don't define $docdir
# NOTE: this won't work on suse, where docdir is /usr/share/doc/packages/$package.
docdir ?= ${datadir}/doc/ceph
doc_DATA = $(srcdir)/sample.ceph.conf sample.fetch_config


# various scripts in $(libexecdir)

ceph_libexecdir = $(libexecdir)/ceph
ceph_libexec_SCRIPTS = ceph_common.sh ceph-osd-prestart.sh

if ENABLE_SUBMAN
submandir = /etc/cron.hourly
subman_DATA = script/subman
endif

# tests to actually run on "make check"; if you need extra, non-test,
# executables built, you need to replace this with manual assignments
# target by target

TESTS = \
	$(check_TESTPROGRAMS) \
	$(check_SCRIPTS)

check_SCRIPTS += \
	../qa/workunits/erasure-code/encode-decode-non-regression.sh \
	test/encoding/readable.sh

if WITH_LTTNG
# TODO: If we're running the parallel test harness (the preferred harness), this should be AM_TESTS_ENVIRONMENT instead.
# See: https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
# I don't see the serial-tests Automake option anywhere, but my AM_TESTS_ENVIRONMENT was being ignored.
TESTS_ENVIRONMENT = LD_PRELOAD=liblttng-ust-fork.so; export LD_PRELOAD; echo "LD_PRELOAD=$${LD_PRELOAD}";
endif

AM_TESTS_ENVIRONMENT = export CEPH_ROOT="$(abs_top_srcdir)";
AM_TESTS_ENVIRONMENT += export CEPH_BUILD_DIR="$(abs_srcdir)";
AM_TESTS_ENVIRONMENT += export CEPH_BIN="$(abs_srcdir)";
AM_TESTS_ENVIRONMENT += export CEPH_LIB="$(abs_srcdir)/.libs";
AM_TESTS_ENVIRONMENT += export PATH="$(abs_srcdir):$$PATH";

# base targets

core-daemons: ceph-mon ceph-osd ceph-mds radosgw
admin-tools: monmaptool osdmaptool crushtool ceph-authtool
base: core-daemons admin-tools \
	cephfs ceph-fuse ceph-syn ceph-conf \
	rados radosgw-admin librados-config \
	init-ceph ceph-post-file \
	ceph


# version stuff

FORCE:
.git_version: FORCE
	$(srcdir)/make_version -g $(srcdir)/.git_version

# if NO_VERSION is set, only generate a new ceph_ver.h if there currently 
# is none, and call "make_version -n" to fill it with a fixed string.
# Otherwise, set it from the contents of .git_version.

ceph_ver.h: .git_version FORCE
	if [ -n "$$NO_VERSION" ] ; then \
		$(srcdir)/make_version -g $(srcdir)/.git_version -c $(srcdir)/ceph_ver.h -n ; \
	else \
		$(srcdir)/make_version -g $(srcdir)/.git_version -c $(srcdir)/ceph_ver.h ; \
	fi

ceph_ver.c: ./ceph_ver.h
common/version.cc: ./ceph_ver.h
test/encoding/ceph_dencoder.cc: ./ceph_ver.h

sample.fetch_config: fetch_config
	cp -f $(srcdir)/fetch_config ./sample.fetch_config

dist-hook:
	$(srcdir)/make_version -g $(srcdir)/.git_version

CLEANFILES += ceph_ver.h sample.fetch_config


# cleaning

base-clean-local::
	rm -f *.so 
	find . -name '*.gcno' -o -name '*.gcda' -o -name '*.lcov' -o -name "*.o" -o -name "*.lo" | xargs rm -f
	rm -f ceph java/java/com/ceph/crush/Bucket.class

LOCAL_CLEAN += base-clean-local

# pybind

python_PYTHON = 

# everything else we want to include in a 'make dist'

noinst_HEADERS += \
	cls_acl.cc\
	cls_crypto.cc\
	fetch_config\
	logrotate.conf\
	sample.ceph.conf\
	bash_completion/ceph \
	bash_completion/rados \
	bash_completion/rbd \
	bash_completion/radosgw-admin \
	mount/canonicalize.c \
	mount/mtab.c \
	objclass/objclass.h


# coverage


install-coverage:
if ENABLE_COVERAGE
	-mkdir -p $(COV_DIR)/.libs
	-$(INSTALL_DATA) $(COV_FILES) $(COV_DIR)
	-$(INSTALL_DATA) $(COV_LIB_FILES) $(COV_DIR)/.libs
endif

uninstall-coverage:
if ENABLE_COVERAGE
	-rm $(COV_DIR)/*.gcno
	-rm $(COV_DIR)/.libs/*.gcno
	-rmdir -p $(COV_DIR)/.libs
	-rmdir -p $(COV_DIR)
endif

check-coverage:
if ENABLE_COVERAGE
	-test/coverage.sh -d $(srcdir) -o check-coverage make check
endif

base-install-data-local:: install-coverage
	-mkdir -p $(DESTDIR)$(sysconfdir)/ceph
	-mkdir -p $(DESTDIR)$(localstatedir)/log/ceph
	-mkdir -p $(DESTDIR)$(localstatedir)/lib/ceph/tmp

LOCAL_INSTALLDATA += base-install-data-local

uninstall-local:: uninstall-coverage
	-rmdir -p $(DESTDIR)$(sysconfdir)/ceph/
	-rmdir -p $(DESTDIR)$(localstatedir)/log/ceph
	-rmdir -p $(DESTDIR)$(localstatedir)/lib/ceph/tmp

#
# coverity rules expect:
#  - cov-build to be in the path
#  - password in ~/coverity.build.pass.txt
#  - ability to scp into the ceph.com directory
#
project.tgz: clean
	rm -rf cov-int
	cov-build --dir cov-int make
	echo Sage Weil sage@newdream.net ceph >> README
	tar czvf project.tgz README cov-int
	rm -f README

coverity-submit:
	scp project.tgz ceph.com:/home/ceph_site/ceph.com/coverity/`git describe`.tgz
	curl --data "project=ceph&password=`cat ~/coverity.build.pass.txt`&email=sage@newdream.net&url=http://ceph.com/coverity/`git describe`.tgz" http://scan5.coverity.com/cgi-bin/submit_build.py

if ENABLE_CLIENT
include Makefile-client.am
endif

if ENABLE_SERVER
include Makefile-server.am
endif

# local targets

all-local: $(LOCAL_ALL)
clean-local: $(LOCAL_CLEAN)
install-exec-local: $(LOCAL_INSTALLEXEC)
install-data-local: $(LOCAL_INSTALLDATA)