-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.am
121 lines (99 loc) · 2.75 KB
/
Makefile.am
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
ACLOCAL_AMFLAGS = -I autotools/m4
check-valgrind:
make -C src/tests check-valgrind
SUBDIRS=src scripts tests web_gui man
rpm_dir=`pwd`/rpms
if LUSTRE
rpmbuild_opt=--with lustre @LDEFINES@
if USER_LOVEA
# Lustre 2.x only
rpmbuild_opt += --with recovtools
endif
else
rpmbuild_opt=--without lustre
endif
if !COMMON_RPMS
rpmbuild_opt+=--without common_rpms
endif
if USE_MYSQL_DB
rpmbuild_opt += --with mysql
dbname=mysql
dbversion=`mysql_config --version | cut -d "." -f 1-2`
else
rpmbuild_opt += --with sqlite
dbname=sqlite
dbversion=`rpm -qa "sqlite-devel*" --qf "%{Version}\n" | tail -1 | \
cut -d "." -f 1-2`
endif
if LUSTRE_HSM
rpmbuild_opt += --with lhsm
else
rpmbuild_opt += --without lhsm
endif
if SHOOK
rpmbuild_opt += --with shook
else
rpmbuild_opt += --without shook
endif
if HSM_LITE
rpmbuild_opt += --with backup
else
rpmbuild_opt += --without backup
endif
new: clean all
mydist:
umask 022; \
TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-ws' \
$(MAKE) dist-gzip
rpms: robinhood.spec mydist
mkdir -p $(rpm_dir)/BUILD $(rpm_dir)/SPECS $(rpm_dir)/SRPMS \
$(rpm_dir)/RPMS
rpmbuild $(rpmbuild_opt) --define="_topdir $(rpm_dir)" \
--define="dbversion $(dbversion)" --define="_prefix $(prefix)" \
--define="configure_flags @ac_configure_args@" \
--define="_sysconfdir @CONFDIR@" \
-ta $(distdir).tar.gz
rpm: robinhood.spec mydist
mkdir -p $(rpm_dir)/BUILD $(rpm_dir)/SPECS $(rpm_dir)/SRPMS $(rpm_dir)/RPMS
rpmbuild $(rpmbuild_opt) --define="_topdir $(rpm_dir)" --define="_prefix $(prefix)" \
--define="dbversion $(dbversion)" \
--define="configure_flags @ac_configure_args@" \
--define="_sysconfdir @CONFDIR@" \
--define="_prefix $(prefix)" -tb $(distdir).tar.gz
srpm: robinhood.spec mydist
mkdir -p $(rpm_dir)/SRPMS $(rpm_dir)/SOURCES
cp -f $(distdir).tar.gz $(rpm_dir)/SOURCES/.
rpmbuild --without lustre --define="_topdir $(rpm_dir)" -bs robinhood.spec
cppcheck:
cppcheck -j12 -v --force --enable=all -I`pwd`/src/include \
-DHAVE_CONFIG_H @PURPOSE_CFLAGS@ @DB_CFLAGS@ src/
lcov:
lcov --capture --directory . --output-file rbh_cov.info && \
genhtml rbh_cov.info --output-directory rbh_cov
mans:
chmod +x ./scripts/make_mans.sh && ./scripts/make_mans.sh
EXTRA_DIST= robinhood.spec robinhood.spec.in \
autogen.sh \
LICENSE.fr.txt LICENSE.en.txt README \
doc/admin_guides \
doc/install_webgui.txt \
doc/templates/includes/*.inc \
doc/templates/*.conf \
ChangeLog \
man/*.1
if ENABLE_UNIT_TESTS
EXTRA_DIST += src/CUnit/CUnit/Sources/Win \
src/CUnit/doc \
src/CUnit/Man \
src/CUnit/Share
TEST_COMMAND = ./src/ut/ut 2> /dev/null
.PHONY: test
test: __test
@$(TEST_COMMAND)
.PHONY: __test
__test: all
else
.PHONY: test
test:
endif
# goodies/vim/robinhood.vim cfg_templates/example.conf