1 SUBDIRS := @LDISKFS_SUBDIR@ \
9 DIST_SUBDIRS := ldiskfs \
17 AUTOMAKE_OPTIONS = foreign
19 if DEQUOTE_CC_VERSION_TEXT
23 FIND_TAG_FILES_CMD = find $(top_srcdir) \
24 -path $(top_srcdir)/ldiskfs/linux-stage \
25 -prune -false -o -type f -name '*.[hc]'
27 # these empty rules are needed so that automake doesn't add its own
40 $(RM) $(top_srcdir)/TAGS
41 ETAGSF=`etags --version | grep -iq exuberant && \
42 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
43 $(FIND_TAG_FILES_CMD) | xargs etags $$ETAGSF -a
46 $(RM) $(top_srcdir)/tags
47 CTAGSF=`ctags --version | grep -iq exuberant && \
48 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
49 $(FIND_TAG_FILES_CMD) | xargs ctags $$CTAGSF -a
54 $(RM) $(top_srcdir)/cscope*.out $(top_srcdir)/cscope.files
55 $(FIND_TAG_FILES_CMD) > cscope.files
59 $(FIND_TAG_FILES_CMD) | xargs mkid
62 doxygen: doxygen-api doxygen-ref
64 doxygen-%: build/doxyfile.%
68 .PHONY: ldiskfs-sources
72 $(MAKE) sources -C @LDISKFS_SUBDIR@ || exit $$?
78 modules: undef.h ldiskfs-sources
79 $(MAKE) DEQUOTE_CC_VERSION_TEXT=$(DEQUOTE) \
80 LDFLAGS= CC="$(CC)" -C $(LINUX_OBJ) \
81 -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
82 LINUXINCLUDE='-I$$(srctree)/arch/$$(SRCARCH)/include -Iarch/$$(SRCARCH)/include/generated -Iinclude $$(if $$(KBUILD_SRC)$$(building_out_of_srctree),-Iinclude2 -I$$(srctree)/include) -I$$(srctree)/arch/$$(SRCARCH)/include/uapi -Iarch/$$(SRCARCH)/include/generated/uapi -I$$(srctree)/include/uapi -Iinclude/generated/uapi -include $(CONFIG_INCLUDE)' \
83 $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
84 include/config/MARKER $@
92 grep -v config.h.in config.h.in > $@
95 find $(distdir) -name .deps -o \
99 -name .#* -exec rm -rf {} \;
101 EXTRA_DIST = @PACKAGE_TARNAME@.spec \
105 lustre-dkms_pre-build.sh \
106 lustre-dkms_post-build.sh \
108 LUSTRE-VERSION-FILE \
112 config/lustre-version.m4
114 # contrib is a directory. Putting a directory in EXTRA_DIST
115 # recursively includes the entire directory contents in the
116 # distribution tarball (the tarball created with "make dist").
117 EXTRA_DIST += contrib
121 @(if test -z "$(RPMBUILD)"; then \
123 "*** Required util 'rpmbuild' missing. Please install the\n" \
124 "*** package for your distribution which provides 'rpmbuild',\n" \
125 "*** re-run configure, and try again.\n"; \
128 $(MKDIR_P) $(rpmbuilddir)/TMP && \
129 $(MKDIR_P) $(rpmbuilddir)/BUILD && \
130 $(MKDIR_P) $(rpmbuilddir)/RPMS && \
131 $(MKDIR_P) $(rpmbuilddir)/SRPMS && \
132 $(MKDIR_P) $(rpmbuilddir)/SPECS && \
133 $(MKDIR_P) $(rpmbuilddir)/SOURCES)
136 dkms-srpm: $(PACKAGE)-dkms.spec dist Makefile
137 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
138 $(MAKE) $(AM_MAKEFLAGS) \
139 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
141 --define "_tmppath $$rpmbuilddir/TMP" \
142 --define "_topdir $$rpmbuilddir" \
143 --define "_sourcedir $(top_srcdir)" \
144 --with servers --with zfs -without ldiskfs \
145 --bs $(PACKAGE)-dkms.spec || exit 1; \
147 --define "_tmppath $$rpmbuilddir/TMP" \
148 --define "_topdir $$rpmbuilddir" \
149 --define "_sourcedir $(top_srcdir)" \
150 --with servers --without zfs --with ldiskfs \
151 --bs $(PACKAGE)-dkms.spec || exit 1; \
153 --define "_tmppath $$rpmbuilddir/TMP" \
154 --define "_topdir $$rpmbuilddir" \
155 --define "_sourcedir $(top_srcdir)" \
156 --with servers --with zfs --with ldiskfs \
157 --bs $(PACKAGE)-dkms.spec || exit 1; \
158 cp $$rpmbuilddir/SRPMS/*.src.rpm $(top_srcdir) || exit 1; \
162 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
164 --define "_tmppath $$rpmbuilddir/TMP" \
165 --define "_topdir $$rpmbuilddir" \
166 @RPMBUILD_BINARY_ARGS@ \
167 --with servers --with zfs --without ldiskfs \
168 --rebuild $(PACKAGE)-zfs-dkms-*.src.rpm || exit 1; \
170 --define "_tmppath $$rpmbuilddir/TMP" \
171 --define "_topdir $$rpmbuilddir" \
172 @RPMBUILD_BINARY_ARGS@ \
173 --with servers --without zfs --with ldiskfs \
174 --rebuild $(PACKAGE)-ldiskfs-dkms-*.src.rpm || exit 1; \
176 --define "_tmppath $$rpmbuilddir/TMP" \
177 --define "_topdir $$rpmbuilddir" \
178 @RPMBUILD_BINARY_ARGS@ \
179 --with servers --with zfs --with ldiskfs \
180 --rebuild $(PACKAGE)-all-dkms-*.src.rpm || exit 1; \
181 cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \
185 dkms-srpm: $(PACKAGE)-dkms.spec dist Makefile
186 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
187 $(MAKE) $(AM_MAKEFLAGS) \
188 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
190 --define "_tmppath $$rpmbuilddir/TMP" \
191 --define "_topdir $$rpmbuilddir" \
192 --define "_sourcedir $(top_srcdir)" \
194 --bs $(PACKAGE)-dkms.spec || exit 1; \
195 cp $$rpmbuilddir/SRPMS/*.src.rpm $(top_srcdir) || exit 1; \
199 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
201 --define "_tmppath $$rpmbuilddir/TMP" \
202 --define "_topdir $$rpmbuilddir" \
203 @RPMBUILD_BINARY_ARGS@ \
205 --rebuild $(PACKAGE)-client-dkms-*.src.rpm || exit 1; \
206 cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \
211 dkms-srpms: dkms-srpm
216 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
217 if test "x@CONFIG_CACHE_FILE@" != "x"; then \
218 export CONFIG_CACHE_FILE="@CONFIG_CACHE_FILE@"; \
220 $(MAKE) $(AM_MAKEFLAGS) \
221 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
223 --define "_tmppath $$rpmbuilddir/TMP" \
224 --define "_topdir $$rpmbuilddir" \
225 @RPMBUILD_BINARY_ARGS@ \
226 --rebuild $(distdir)-*.src.rpm || exit 1; \
227 cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \
230 srpm: @PACKAGE_TARNAME@.spec dist Makefile
231 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
232 $(MAKE) $(AM_MAKEFLAGS) \
233 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
234 cp $(top_srcdir)/rpm/* $(top_srcdir); \
236 --define "_tmppath $$rpmbuilddir/TMP" \
237 --define "_topdir $$rpmbuilddir" \
238 --define "dist %{nil}" \
239 -ts $(distdir).tar.gz || exit 1; \
240 cp $$rpmbuilddir/SRPMS/$(distdir)-*.src.rpm $(top_srcdir) || exit 1; \
244 export SRC_GIT_HASH=$$(git log --oneline | head -1 | cut -d' ' -f1); \
245 rm -f /usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2; \
246 if test -f /usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2; then \
247 echo "************************************************************" ; \
248 echo "WARNING: move or remove /usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2" ; \
249 echo "************************************************************" ; \
252 # In the debs target, first make sure what's in the changelog reflects
253 # the software version.
254 debs: undef.h debs_common
255 cp -v debian/changelog.in debian/changelog ; \
256 export SRC_GIT_HASH=$$(git log --oneline | head -1 | cut -d' ' -f1); \
257 lversion=$$(echo @VERSION@ | tr '_' '-'); \
258 cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
259 if [ "$$lversion" != "$$cversion" ]; then \
260 echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n * Automated changelog entry update\n\n -- Andreas Dilger <adilger@whamcloud.com> $$(date -R)\n\n.\nwq" | ed debian/changelog; \
263 if test "x@ENABLE_SERVER@" = "xyes"; then \
264 DEB_BUILD_PROFILES="server"; \
266 DEB_BUILD_PROFILES="client"; \
268 if test "x@ENABLE_LDISKFS@" = "xyes"; then \
269 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} ldiskfs"; \
271 if test "x@ENABLE_ZFS@" = "xyes"; then \
272 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} zfs"; \
273 export SPL_SRC="@SPL@"; \
274 export ZFS_SRC="@ZFS@"; \
275 echo "ZFS support is enabled. Will expect pre-compiled SPL and ZFS sources in:"; \
276 echo "SPL: $${SPL_SRC}"; \
277 echo "ZFS: $${ZFS_SRC}"; \
279 if test "x@ENABLEO2IB@" != "xno"; then \
280 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} o2ib"; \
281 export O2IB_SRC="@O2IBPATH@"; \
283 if test "x@CONFIG_CACHE_FILE@" != "x"; then \
284 export CONFIG_CACHE_FILE="@CONFIG_CACHE_FILE@"; \
286 if test "x@ENABLE_GSS@" = "xyes"; then \
287 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gss"; \
288 debiantmp=$$(mktemp -t -d debbuild-$$USER-XXXXXXXX) ; \
289 cp debian/control $$debiantmp/control.bkp ; \
290 cp debian/control.main $$debiantmp/control.main.bkp ; \
291 cp debian/control.modules.in $$debiantmp/control.modules.in.bkp ; \
292 sed -i "s+^\(Build-Depends: .*\)$$+\1, libkrb5-dev, libssl-dev+" debian/control.main ; \
293 awk 'BEGIN{change=0} $$1 == "Package:" {if (($$2 == "lustre-client-utils") || ($$2 == "lustre-server-utils")) change=1; else change=0; fi } {if (($$1 == "Depends:") && change) print $$0 ", libgssapi-krb5-2, libkrb5-3, libssl1.1|libssl3"; else print; fi}' debian/control.main > $$debiantmp/control.main && mv $$debiantmp/control.main debian/control.main ; \
294 sed -i "s+^\(Build-Depends: .*\)$$+\1, libkrb5-dev, libssl-dev+" debian/control.modules.in ; \
295 elif test "x@ENABLE_GSS@" = "xno"; then \
296 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogss"; \
298 if test "x@ENABLE_CRYPTO@" = "xyes"; then \
299 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} crypto"; \
300 elif test "x@ENABLE_CRYPTO@" = "xno"; then \
301 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nocrypto"; \
303 if test "x@systemdsystemunitdir@" != "x"; then \
304 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} systemd"; \
306 if test "x@ENABLE_PINGER@" = "xyes"; then \
307 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} pinger"; \
308 elif test "x@ENABLE_PINGER@" = "xno"; then \
309 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopinger"; \
311 if test "x@ENABLE_CHECKSUM@" = "xyes"; then \
312 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} checksum"; \
313 elif test "x@ENABLE_CHECKSUM@" = "xno"; then \
314 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nochecksum"; \
316 if test "x@ENABLE_FLOCK@" = "xyes"; then \
317 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} flock"; \
318 elif test "x@ENABLE_FLOCK@" = "xno"; then \
319 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noflock"; \
321 if test "x@ENABLE_HEALTH_WRITE@" = "xyes"; then \
322 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} health_write"; \
323 elif test "x@ENABLE_HEALTH_WRITE@" = "xno"; then \
324 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nohealth_write"; \
326 if test "x@ENABLE_LRU_RESIZE@" = "xyes"; then \
327 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} lru-resize"; \
328 elif test "x@ENABLE_LRU_RESIZE@" = "xno"; then \
329 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolru-resize"; \
331 if test "x@ENABLE_MINDF@" = "xyes"; then \
332 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} mindf"; \
333 elif test "x@ENABLE_MINDF@" = "xno"; then \
334 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nomindf"; \
336 if test "x@ENABLE_FAIL_ALLOC@" = "xyes"; then \
337 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} fail-alloc"; \
338 elif test "x@ENABLE_FAIL_ALLOC@" = "xno"; then \
339 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nofail-alloc"; \
341 if test "x@ENABLE_INVARIANTS@" = "xyes"; then \
342 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} invariants"; \
343 elif test "x@ENABLE_INVARIANTS@" = "xno"; then \
344 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noinvariants"; \
346 if test "x@ENABLE_LU_REF@" = "xyes"; then \
347 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} lu_ref"; \
348 elif test "x@ENABLE_LU_REF@" = "xno"; then \
349 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolu_ref"; \
351 if test "x@ENABLE_PGSTAT_TRACK@" = "xyes"; then \
352 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} pgstate-track"; \
353 elif test "x@ENABLE_PGSTAT_TRACK@" = "xno"; then \
354 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopgstate-track"; \
356 if test "x@ENABLE_LIBCFS_CDEBUG@" = "xyes"; then \
357 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-cdebug"; \
358 elif test "x@ENABLE_LIBCFS_CDEBUG@" = "xno"; then \
359 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-cdebug"; \
361 if test "x@ENABLE_LIBCFS_TRACE@" = "xyes"; then \
362 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-trace"; \
363 elif test "x@ENABLE_LIBCFS_TRACE@" = "xno"; then \
364 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-trace"; \
366 if test "x@ENABLE_LIBCFS_ASSERT@" = "xyes"; then \
367 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-assert"; \
368 elif test "x@ENABLE_LIBCFS_ASSERT@" = "xno"; then \
369 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-assert"; \
371 if test "x@ENABLE_PANIC_DUMPLOG@" = "xyes"; then \
372 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} panic_dumplog"; \
373 elif test "x@ENABLE_PANIC_DUMPLOG@" = "xno"; then \
374 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopanic_dumplog"; \
376 if test "x@ENABLE_READLINE@" = "xyes"; then \
377 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} readline"; \
378 elif test "x@ENABLE_READLINE@" = "xno"; then \
379 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noreadline"; \
381 if test "x@ENABLE_LIBPTHREAD@" = "xyes"; then \
382 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libpthread"; \
383 elif test "x@ENABLE_LIBPTHREAD@" = "xno"; then \
384 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibpthread"; \
386 if test "x@ENABLE_BACKOFF@" = "xyes"; then \
387 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} backoff"; \
388 elif test "x@ENABLE_BACKOFF@" = "xno"; then \
389 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nobackoff"; \
391 if test "x@ENABLE_GNI@" = "xyes"; then \
392 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gni"; \
393 elif test "x@ENABLE_GNI@" = "xno"; then \
394 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogni"; \
396 if test "x@ENABLE_EFENCE@" = "xyes"; then \
397 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} efence"; \
398 elif test "x@ENABLE_EFENCE@" = "xno"; then \
399 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noefence"; \
401 export KERNEL_OBJ="$(LINUX_OBJ)"; \
402 export KERNEL_SRC="$(LINUX)"; \
403 echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \
404 echo "Kernel Source: $${KERNEL_SRC}"; \
405 echo "Kernel Object: $${KERNEL_OBJ}"; \
406 if test "x@ENABLEO2IB@" = "xno"; then \
407 export IB_OPTIONS="--with-o2ib=no"; \
409 if test "x@ENABLEO2IB@" != "xyes" && \
410 test -n "@O2IBPATH@"; then \
411 export IB_OPTIONS="--with-o2ib=@O2IBPATH@"; \
413 export IB_OPTIONS="--with-o2ib=yes"; \
416 dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
417 rc=$${PIPESTATUS[0]}; \
418 cp $$debiantmp/control.bkp debian/control || true && \
419 cp $$debiantmp/control.main.bkp debian/control.main || true && \
420 cp $$debiantmp/control.modules.in.bkp debian/control.modules.in || true && \
421 [ $${rc} -gt 1 ] && exit $${rc}; \
424 cp $$debiantmp/control.bkp debian/control || true && \
425 cp $$debiantmp/control.main.bkp debian/control.main || true && \
426 cp $$debiantmp/control.modules.in.bkp debian/control.modules.in || true && \
427 export KPKG_DEST_DIR="$$(pwd)/.." && \
428 version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \
429 rm -rf debian/tmp/modules-deb && \
430 mkdir debian/tmp/modules-deb && \
431 pushd debian/tmp/modules-deb && \
432 dpkg -x ../../../../lustre-source_$${version}_all.deb $$(pwd) && \
434 tar -C usr_src/ -xjf usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2 && \
435 chmod 755 usr_src/modules/lustre/debian/rules && \
436 mkdir -p usr_share_modass && \
437 ln -s /usr/share/modass/include/ usr_share_modass/ && \
438 ln -s /usr/share/modass/packages/ usr_share_modass/ && \
439 echo "lustre" > usr_share_modass/compliant.list && \
440 export MA_DIR=$$(pwd)/usr_share_modass && \
441 KVERS=$${KVERS:-$(LINUXRELEASE)} && \
442 export KSRC_TREE=$(LINUX) && \
443 KSRC=$${KSRC:-$(LINUX_OBJ)} && \
444 TARBALL=$$(realpath usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2) \
445 m-a build $${KSRC:+-k $$KSRC} $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \
447 VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
448 if test "x@ENABLE_SERVER@" = "xyes"; then \
449 DEB_SERVER_PKG="../lustre-resource-agents_$${VER}_*.deb"; \
452 mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \
453 ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \
454 ../lustre-*-utils_$${VER}_*.deb $${DEB_SERVER_PKG} \
455 ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \
456 ../lustre_$${VER}.tar.gz ../lustre-*-modules-$${KVERS}_$${VER}_*.deb \
459 dkms-debs: undef.h debs_common
460 cp -v debian/changelog.in debian/changelog ; \
461 export SRC_GIT_HASH=$$(git log --oneline | head -1 | cut -d' ' -f1); \
462 lversion=$$(echo @VERSION@ | tr '_' '-'); \
463 cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
464 if [ "$$lversion" != "$$cversion" ]; then \
465 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; \
468 export DEB_BUILD_PROFILES="client"; \
469 export KERNEL_OBJ="$(LINUX_OBJ)"; \
470 export KERNEL_SRC="$(LINUX)"; \
471 echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \
472 echo "Kernel Source: $${KERNEL_SRC}"; \
473 echo "Kernel Object: $${KERNEL_OBJ}"; \
474 export BUILD_DKMS="true" && \
475 dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
476 rc=$${PIPESTATUS[0]}; \
477 [ $${rc} -gt 1 ] && exit $${rc}; \
480 VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
482 mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \
483 ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \
484 ../lustre-*-utils_$${VER}_*.deb \
485 ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \
486 ../lustre_$${VER}.tar.gz ../lustre-*-modules-dkms_$${VER}_*.deb \
489 EXTRA_DIST += debian/*
492 CSTKO=/tmp/checkstack.orig
495 [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
496 { for MOD in $$(find . -name "*.ko"); do \
497 objdump -d $$MOD | perl contrib/scripts/checkstack.pl; \
498 done } | grep -v " bug " | sort -nr | uniq > ${CSTK}
499 [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -n 30 ${CSTK}
502 [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
505 rm -f ${CSTK} ${CSTKO}