Merge pull request #24227 from liewegas/wip-36104-hammer
[ceph.git] / Makefile.am
1 AUTOMAKE_OPTIONS = gnu
2 ACLOCAL_AMFLAGS = -I m4
3 EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec install-deps.sh
4 # the "." here makes sure check-local builds gtest and gmock before they are used
5 SUBDIRS = . src man
6
7 EXTRA_DIST += \
8         src/test/run-cli-tests \
9         src/test/run-cli-tests-maybe-unset-ccache \
10         src/test/cli \
11         src/test/downloads \
12         udev/50-rbd.rules \
13         udev/60-ceph-partuuid-workaround.rules \
14         udev/95-ceph-osd.rules \
15         udev/95-ceph-osd-alt.rules \
16         share/known_hosts_drop.ceph.com \
17         share/id_dsa_drop.ceph.com \
18         share/id_dsa_drop.ceph.com.pub
19
20 # why is it so hard to make autotools to this?
21 install-data-local:
22         -mkdir -p $(DESTDIR)$(datadir)/ceph
23         -install -m 600 share/known_hosts_drop.ceph.com $(DESTDIR)$(datadir)/ceph/known_hosts_drop.ceph.com
24         -install -m 600 share/id_dsa_drop.ceph.com $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com
25         -install -m 600 share/id_dsa_drop.ceph.com.pub $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com.pub
26
27 all-local:
28 if WITH_DEBUG
29 #       We need gtest to build the rados-api tests. We only build those in
30 #       a debug build, though.
31         @cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
32         @cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
33 endif
34
35 check-local: all
36 #       We build gtest this way, instead of using SUBDIRS, because with that,
37 #       gtest's own tests would be run and that would slow us down.
38         @cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
39         @cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
40 #       exercise cli tools
41         $(srcdir)/src/test/run-cli-tests '$(top_builddir)/src/test'
42
43 # "make distclean" both runs this and recurses into src/gtest, if
44 # gtest is in DIST_SUBDIRS. Take extra care to not fail when
45 # effectively cleaned twice.
46 clean-local:
47         @if test -e src/gmock/Makefile; then \
48           echo "Making clean in src/gmock"; \
49           cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
50         fi
51
52         @rm -rf src/test/virtualenv
53
54
55 # NOTE: This only works when enough dependencies are installed for
56 # autoconf to be happy.  These commands should be run manually to
57 # bootstrap.
58 install-deps:
59         ./install-deps.sh
60
61 dist-hook:
62 #       Generates the full list of contributors
63         if test -d $(srcdir)/.git; then \
64           cd $(srcdir); \
65           git log --format='%aN <%aE>' | sort -u >$(distdir)/AUTHORS; \
66         fi
67 #       Generates ChangeLog from git
68         if test -d $(srcdir)/.git; then \
69           cd $(srcdir); \
70           git log --oneline --decorate --no-merges > $(distdir)/ChangeLog; \
71         fi