+rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
+ CONFIGURE_ARGS=$$(echo $$(eval echo $(ac_configure_args)) | \
+ sed -re 's/--(en|dis)able-tests//'); \
+ if [ -n "@LINUX@" ]; then \
+ CONFIGURE_ARGS=$$(echo $$(eval echo $$CONFIGURE_ARGS) | \
+ sed -re 's/--with-linux=[^ ][^ ]*//'); \
+ RPMARGS="--define \"kdir @LINUX@\""; \
+ CONFIGURE_ARGS=$$(echo $$(eval echo $$CONFIGURE_ARGS) | \
+ sed -re 's/--with-linux-obj=[^ ][^ ]*//'); \
+ if [ -n "@LINUX_OBJ@" -a "@LINUX_OBJ@" != "@LINUX@" ]; then \
+ RPMARGS="$$RPMARGS --define \"kobjdir @LINUX_OBJ@\""; \
+ fi; \
+ fi; \
+ if [ -n "@CROSS_PATH@" ]; then \
+ if [[ "X$(BUILD_SERVER)" = Xtrue ]]; then \
+ echo -e "\n" \
+ "*** Don't support cross compilation for the Intel(R) Xeon Phi(TM) card.\n"; \
+ exit 1; \
+ fi; \
+ CROSS_SUFFIX="-mic"; \
+ RPMARGS="$$RPMARGS --define \"post_script build/gen_filelist.sh\""; \
+ RPMARGS="$$RPMARGS --define \"cross_path @CROSS_PATH@\""; \
+ RPMARGS="$$RPMARGS --define \"rootdir %{cross_path}\""; \
+ RPMARGS="$$RPMARGS --define \"_prefix %{cross_path}/usr\""; \
+ RPMARGS="$$RPMARGS --define \"_mandir %{_prefix}/share/man\""; \
+ RPMARGS="$$RPMARGS --define \"_sysconfdir %{cross_path}/etc\""; \
+ RPMARGS="$$RPMARGS --define \"make_args @CROSS_VARS@\""; \
+ if [ -s @LINUX@/../../.ver.build ]; then \
+ MPSS_VERSION=$$(sed -ne 's/DRIVERS_\(.*\)-.*/\1/p' @LINUX@/../../.ver.build); \
+ if [ -n "$$MPSS_VERSION" ]; then \
+ RPMARGS="$$RPMARGS --define \"cross_requires intel-mic-gpl = 2.1.$$MPSS_VERSION\""; \
+ fi; \
+ fi; \
+ fi; \
+ CONFIGURE_ARGS=$$(echo $$(eval echo $$CONFIGURE_ARGS) | \
+ sed -re 's/--with-release=[^ ][^ ]*//'); \
+ RPMARGS="$$RPMARGS --define \"configure_args $$CONFIGURE_ARGS\""; \
+ if [[ "X$(BUILD_TESTS)" = Xfalse ]]; then \
+ RPMARGS="$$RPMARGS --without lustre_tests"; \
+ fi; \
+ if [[ "X$(BUILD_SERVER)" = Xfalse ]]; then \
+ RPMARGS="$$RPMARGS --without servers"; \
+ if [ -n "@CROSS_PATH@" ]; then \
+ RPMARGS="$$RPMARGS --define \"lustre_name lustre-client$$CROSS_SUFFIX\""; \
+ fi; \
+ fi; \
+ if [[ "X$(BUILD_OSD_LDISKFS)" = Xtrue ]]; then \
+ RPMARGS="$$RPMARGS --with ldiskfs"; \
+ fi; \
+ if [[ "X$(BUILD_OSD_ZFS)" = Xtrue ]]; then \
+ RPMARGS="$$RPMARGS --with zfs"; \
+ fi; \
+ echo "Building Lustre RPM with $$RPMARGS"; \
+ eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz
+
+srpm-real: @PACKAGE_TARNAME@.spec dist Makefile
+ if [[ "X$(BUILD_TESTS)" = Xfalse ]]; then \
+ RPMARGS="--without lustre_tests"; \
+ fi; \
+ eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz
+
+rpms:
+ @$(MAKEEACHSUBDIR)
+ $(MAKE) $(AM_MAKEFLAGS) rpms-real
+
+srpm:
+ @$(MAKEEACHSUBDIR)
+ $(MAKE) $(AM_MAKEFLAGS) srpm-real
+
+# In the debs target, first make sure what's in the changelog reflects
+# the software version. Here's how we could dig the version out of the
+# autoconf version file directly:
+# lversion=$$(sed -ne 's/m4_define(\[LUSTRE_[A-Z][A-Z]*\],\[\([0-9][0-9]*\)\])$$/\1/p'
+# lustre/autoconf/lustre-version.ac | tr '\n' '.' | sed -e 's/.$//');
+#
+# However, one cannot really run "make debs" without having done a
+# configure first, so we could use the easier method of digging the
+# version out of the config.h file.
+debs:
+ lversion=$$(sed -ne 's/^#define VERSION "\(.*\)"$$/\1/p' config.h); \
+ cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
+ if [ "$$lversion" != "$$cversion" ]; then \
+ echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca> $$(date -R)\n\n.\nwq" | ed debian/changelog; \
+ fi; \
+ rm -rf debs
+ dpkg-buildpackage -I.git -I\*.out[0-9]\* -I\*.swp || { \
+ rc=$${PIPESTATUS[0]}; \
+ [ $${rc} -gt 1 ] && exit $${rc}; \
+ exit 0; \
+ }
+ export KPKG_DEST_DIR="$$(pwd)/.." && \
+ version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \
+ rm -rf debian/tmp/modules-deb && \
+ mkdir debian/tmp/modules-deb && \
+ pushd debian/tmp/modules-deb && \
+ dpkg -x ../../../../lustre-source_$${version}_all.deb $$(pwd) && \
+ mkdir usr_src/ && \
+ tar -C usr_src/ -xjf usr/src/lustre.tar.bz2 && \
+ chmod 755 usr_src/modules/lustre/debian/rules && \
+ mkdir -p usr_share_modass && \
+ ln -s /usr/share/modass/include/ usr_share_modass/ && \
+ ln -s /usr/share/modass/packages/ usr_share_modass/ && \
+ echo "lustre" > usr_share_modass/compliant.list && \
+ export MA_DIR=$$(pwd)/usr_share_modass && \
+ KVERS=$${KVERS:-$(LINUXRELEASE)}; \
+ m-a build $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \
+ popd && \
+ VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog); \
+ mkdir -p debs && \
+ mv ../liblustre_$${VER}_*.deb ../linux-patch-lustre_$${VER}_all.deb ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb ../lustre-tests_$${VER}_*.deb ../lustre-utils_$${VER}_*.deb ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes ../lustre_$${VER%-[0-9]*}.orig.tar.gz ../lustre_$${VER}.diff.gz ../lustre-client-modules-$${KVERS}_$${VER}_*.deb debs/