forked from cea-hpc/robinhood
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
89 lines (70 loc) · 2.33 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
ACLOCAL_AMFLAGS = -I autotools/m4
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 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 TMP_FS_MGR
purpose=tmp_fs_mgr
endif
if LUSTRE_HSM
purpose=lustre_hsm
rpmbuild_opt += --with lhsm
endif
if SHOOK
purpose=shook
rpmbuild_opt += --with shook
endif
if BACKUP
purpose=backup
rpmbuild_opt += --with backup
endif
new: clean all
rpms: robinhood.spec dist
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="purpose $(purpose)" --define="_prefix $(prefix)" \
--define="_sysconfdir @CONFDIR@" \
-ta $(distdir).tar.gz
rpm: robinhood.spec dist
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="purpose $(purpose)" \
--define="_sysconfdir @CONFDIR@" \
--define="_prefix $(prefix)" -tb $(distdir).tar.gz
srpm: robinhood.spec dist
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="purpose $(purpose)" \
--define="_sysconfdir @CONFDIR@" \
-ts $(distdir).tar.gz
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 \
doc/templates \
LICENSE.fr.txt LICENSE.en.txt README.tmp_fs_mgr README.Lustre_HSM \
doc/admin_guides \
doc/install_webgui.txt \
ChangeLog \
man/*.1
# goodies/vim/robinhood.vim cfg_templates/example.conf