3 SUBDIRS
=include src init.d doc librhcm
6 # Main build. We build static-libs in librhcm first because we do not want
7 # the cluster to be detached from the API library - that is, changing the
8 # API library should not break the cluster's internal stuff.
11 make
-C librhcm dynamic-clean static-libs
12 for subdir in
$(SUBDIRS
); do make
-C
$$subdir || exit
1; done
16 # Build the clumanager.spec file from clumanager.spec.in. Just a sed
18 # Uses "VERSION" define from Makefile.top.
20 clumanager.spec
: clumanager.spec.in Makefile.top
21 @
[ -n
"$(RELEASE)" ] || echo
"RELEASE not defined; aborting"
22 @
[ -n
"$(RELEASE)" ] || exit
1
23 sed
-e s
/"##VERSION##"/$(VERSION
)/g \
24 -e s
/"##RELEASE##"/$(RELEASE
)/g \
25 clumanager.spec.in
> clumanager.spec
32 rm -f clumanager-
$(VERSION
)*src.rpm
33 [ -z
"`/bin/ls *patch`" ] || cp
*patch
`pwd`/rpm_build
34 rpmbuild
--define "_sourcedir `pwd`/rpm_build" \
35 --define "_srcrpmdir `pwd`/rpm_build" \
36 --define "_builddir `pwd`/rpm_build" \
37 --define "_rpmdir `pwd`/rpm_build" --nodeps
-bs \
38 rpm_build
/clumanager.spec
42 rm -f clumanager-
$(VERSION
)*$(ARCH
).rpm
43 rpmbuild
--define "_sourcedir `pwd`/rpm_build" \
44 --define "_srcrpmdir `pwd`/rpm_build" \
45 --define "_builddir `pwd`/rpm_build" \
46 --define "_rpmdir `pwd`/rpm_build" --nodeps
-bb \
47 rpm_build
/clumanager.spec
52 make RELEASE
=0.1git
`git log -1 | head -1 | cut -f2 -d' '` rpms
57 rpmcommon
: librhcm
/sizes.h rpm_build
59 rpm_build
: tarball clumanager.spec librhcm
/sizes.h
62 cp clumanager-
$(VERSION
).
tar.gz rpm_build
63 cp clumanager.spec rpm_build
69 tarball
: clumanager-
$(VERSION
).
tar.gz librhcm
/sizes.h
72 rm -f clumanager-
*.
tar.gz
74 clumanager-
$(VERSION
).
tar.gz
: librhcm
/sizes.h
75 rm -rf clumanager-
$(VERSION
)
76 mkdir clumanager-
$(VERSION
)
77 cp Makefile
* clumanager-
$(VERSION
)
78 cp COPYING ChangeLog clumanager.doxygen clumanager.spec.in \
80 for subdir in
$(SUBDIRS
); do cp
-a
$$subdir clumanager-
$(VERSION
); done
81 make
-C clumanager-
$(VERSION
) purge gitpurge
82 tar -czf clumanager-
$(VERSION
).
tar.gz clumanager-
$(VERSION
)
83 rm -rf clumanager-
$(VERSION
)
86 # Spec file operations.
88 spec
: clumanager.spec librhcm
/sizes.h
92 # Pool cleaning operations.
98 find .
-type d
-name
".git" | xargs
rm -rf
101 find .
-name
"*buildtest*" | xargs
rm -f
103 rm -f librhcm
/sizes.h
104 for subdir in
$(SUBDIRS
); do make
-C
$$subdir clean || exit
1; done
106 maintainer-clean
: dist-clean
110 purge
: clean tarball-clean spec-clean
111 rm -rf clumanager-api
112 rm -f .
/clumanager
*rpm
119 for subdir in
$(SUBDIRS
); do make
-C
$$subdir install || exit
1; done
121 install -m
0644 COPYING
$(DOCDIR
)
122 install -m
0644 ChangeLog
$(DOCDIR
)
124 echo
"Member-wide lock files are stored here - do not remove" > \
125 $(LOCKDIR
)/README.locks
128 # We generate this at build time.
131 make
-C librhcm sizes.h