-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathMakefile.am
92 lines (74 loc) · 3.34 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
include $(top_srcdir)/Common.am
ACLOCAL_MFLAGS = -I m4
SUBDIRS = lib src plugins commands tests
EXTRA_DIST = install_libs.py install_modules.py nova-agent.py \
run_tests.py patch_binary.py scripts/agent-smith \
scripts/generic/nova-agent scripts/gentoo/nova-agent \
scripts/freebsd/nova-agent
data_DATA = nova-agent.py
nodist_noinst_DATA = agentlib.so \
scripts/installer.sh \
scripts/generic/nova-agent \
scripts/gentoo/nova-agent \
scripts/freebsd/nova-agent
noinst_DATA = scripts/generic/nova-agent.in \
scripts/gentoo/nova-agent.in \
scripts/freebsd/nova-agent.in
agentlib.so:
ln -s lib/.libs/agentlib.so agentlib.so
BINTARDIR = @PACKAGE@-`uname -s`-`uname -m`-@PACKAGE_VERSION@
BINTARNAME = ${BINTARDIR}.tar.gz
FULLBINTARDIR = $(top_srcdir)/${BINTARDIR}
check-local:
@${PYTHON_VER} run_tests.py
install-exec-local: install-modules install-libs patch-binary
rm -f ${DESTDIR}${datadir}/../nova-agent.py
ln -s ${datadir}/nova-agent.py ${DESTDIR}${datadir}/../nova-agent.py
# @$(PYTHON_VER) $(top_srcdir)/patch_libs.py ${DESTDIR}${datadir} $(libdir)
install-modules:
@$(PYTHON_VER) $(top_srcdir)/install_modules.py ${DESTDIR}$(modulesdir)
install-libs:
@$(PYTHON_VER) $(top_srcdir)/install_libs.py ${DESTDIR}$(sbindir)/nova-agent $(DESTDIR)${datadir} ${DESTDIR}/$(libdir)
patch-binary:
@$(PYTHON_VER) $(top_srcdir)/patch_binary.py ${DESTDIR}${sbindir}/nova-agent ${DESTDIR} $(libdir)
distclean-local:
rm -f $(top_srcdir)/{configure,configure.in}
rm -f $(top_srcdir)/{aclocal.m4,compile,config.guess,config.sub}
rm -f $(top_srcdir)/{depcomp,install-sh,ltmain.sh,missing}
find $(top_srcdir) -name Makefile.in -exec rm -f {} \;
find $(top_srcdir) -name configure.in -exec rm -f {} \;
rm -rf $(top_srcdir)/m4
rm -rf $(top_srcdir)/autom4te.cache
clean-local::
rm -f agentlib.so
find . -name '*.gcov' -delete -o -name '*.gcda' -delete -o -name '*.gcno' -delete
find . -name '*.pyc' -exec rm -f {} \;
rm -rf $(top_srcdir)/${BINTARDIR}
coverage:: check
for d in $(SUBDIRS) ; do cd $$d ; for f in *.c ; do gcov $$f; done ; cd ..; done
bintar: all
@rm -rf ${FULLBINTARDIR}
@mkdir -m 0755 ${FULLBINTARDIR} ${FULLBINTARDIR}/${prefix}
@mkdir -m 0755 ${FULLBINTARDIR}/${prefix}/{share,sbin}
@$(MAKE) install DESTDIR=$(CURDIR)/${BINTARDIR}
@chmod -R go-rwx ${FULLBINTARDIR}/${datadir}
@cp $(top_srcdir)/scripts/agent-smith ${FULLBINTARDIR}/${prefix}/sbin/.
@chmod 700 ${FULLBINTARDIR}/${prefix}/sbin/agent-smith
@cp $(top_srcdir)/scripts/installer.sh ${FULLBINTARDIR}/.
@chmod 700 ${FULLBINTARDIR}/installer.sh
@mkdir -m 0700 ${FULLBINTARDIR}/${etcdir}
@mkdir -m 0700 ${FULLBINTARDIR}/${etcdir}/generic
@mkdir -m 0700 ${FULLBINTARDIR}/${etcdir}/gentoo
@mkdir -m 0700 ${FULLBINTARDIR}/${etcdir}/freebsd
@install -m 700 $(top_srcdir)/scripts/generic/nova-agent ${FULLBINTARDIR}/${etcdir}/generic/nova-agent
@install -m 700 $(top_srcdir)/scripts/gentoo/nova-agent ${FULLBINTARDIR}/${etcdir}/gentoo/nova-agent
@install -m 700 $(top_srcdir)/scripts/freebsd/nova-agent ${FULLBINTARDIR}/${etcdir}/freebsd/nova-agent
@chown -R 0:0 ${FULLBINTARDIR}
# agent-smith requires that we don't have a subdir in the tar
# once agent-smith is dead, we can use this
# @tar -czf $(top_srcdir)/${BINTARNAME} -C $(CURDIR) ${BINTARDIR}
@tar -czf $(top_srcdir)/${BINTARNAME} -C $(CURDIR)/${BINTARDIR} .
@rm -rf ${FULLBINTARDIR}
@echo ""
@echo "Created $(BINTARNAME)"
@echo ""