1 # SPDX-License-Identifier: GPL-2.0
4 # This file is part of Lustre, http://www.lustre.org/
8 # Used by automake to create the top-level autoMakefile.in,
9 # which is used by config.status to create the top-level
13 SUBDIRS := @LDISKFS_SUBDIR@ \
15 @LUSTREIOKIT_SUBDIR@ \
21 DIST_SUBDIRS := ldiskfs \
29 AUTOMAKE_OPTIONS = foreign
31 if DEQUOTE_CC_VERSION_TEXT
35 FIND_TAG_FILES_CMD = find $(top_srcdir) \
36 -path $(top_srcdir)/ldiskfs/linux-stage \
37 -prune -false -o -type f -name '*.[hc]'
39 # these empty rules are needed so that automake doesn't add its own
52 $(RM) $(top_srcdir)/TAGS
53 ETAGSF=`etags --version | grep -iq exuberant && \
54 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
55 $(FIND_TAG_FILES_CMD) | xargs etags $$ETAGSF -a
58 $(RM) $(top_srcdir)/tags
59 CTAGSF=`ctags --version | grep -iq exuberant && \
60 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
61 $(FIND_TAG_FILES_CMD) | xargs ctags $$CTAGSF -a
66 $(RM) $(top_srcdir)/cscope*.out $(top_srcdir)/cscope.files
67 $(FIND_TAG_FILES_CMD) > cscope.files
71 $(FIND_TAG_FILES_CMD) | xargs mkid
75 .PHONY: ldiskfs-sources
79 $(MAKE) sources -C @LDISKFS_SUBDIR@ || exit $$?
85 modules: undef.h ldiskfs-sources
86 $(MAKE) DEQUOTE_CC_VERSION_TEXT=$(DEQUOTE) \
87 LDFLAGS= CC="$(CC)" -C $(LINUX_OBJ) \
88 -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
89 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)' \
90 $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
91 include/config/MARKER $@
98 # compiler plugins should be built as soon as possible,
99 # so they can be available to the rest of the build
103 $(MAKE) all -C cc-plugins
107 grep -v config.h.in config.h.in > $@
110 find $(distdir) -name .deps -o \
114 -name .#* -exec rm -rf {} \;
116 EXTRA_DIST = @PACKAGE_TARNAME@.spec \
120 lustre-dkms_pre-build.sh \
121 lustre-dkms_post-build.sh \
123 LUSTRE-VERSION-FILE \
126 config/lustre-version.m4
128 # contrib is a directory. Putting a directory in EXTRA_DIST
129 # recursively includes the entire directory contents in the
130 # distribution tarball (the tarball created with "make dist").
131 EXTRA_DIST += contrib
135 @(if test -z "$(RPMBUILD)"; then \
137 "*** Required util 'rpmbuild' missing. Please install the\n" \
138 "*** package for your distribution which provides 'rpmbuild',\n" \
139 "*** re-run configure, and try again.\n"; \
142 $(MKDIR_P) $(rpmbuilddir)/TMP && \
143 $(MKDIR_P) $(rpmbuilddir)/BUILD && \
144 $(MKDIR_P) $(rpmbuilddir)/RPMS && \
145 $(MKDIR_P) $(rpmbuilddir)/SRPMS && \
146 $(MKDIR_P) $(rpmbuilddir)/SPECS && \
147 $(MKDIR_P) $(rpmbuilddir)/SOURCES)
150 dkms-srpm: $(PACKAGE)-dkms.spec dist Makefile
151 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
152 $(MAKE) $(AM_MAKEFLAGS) \
153 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
155 --define "_tmppath $$rpmbuilddir/TMP" \
156 --define "_topdir $$rpmbuilddir" \
157 --define "_sourcedir $(top_srcdir)" \
158 --with servers --with zfs -without ldiskfs \
159 --bs $(PACKAGE)-dkms.spec || exit 1; \
161 --define "_tmppath $$rpmbuilddir/TMP" \
162 --define "_topdir $$rpmbuilddir" \
163 --define "_sourcedir $(top_srcdir)" \
164 --with servers --without zfs --with ldiskfs \
165 --bs $(PACKAGE)-dkms.spec || exit 1; \
167 --define "_tmppath $$rpmbuilddir/TMP" \
168 --define "_topdir $$rpmbuilddir" \
169 --define "_sourcedir $(top_srcdir)" \
170 --with servers --with zfs --with ldiskfs \
171 --bs $(PACKAGE)-dkms.spec || exit 1; \
172 cp $$rpmbuilddir/SRPMS/*.src.rpm $(top_srcdir) || exit 1; \
176 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
178 --define "_tmppath $$rpmbuilddir/TMP" \
179 --define "_topdir $$rpmbuilddir" \
180 @RPMBUILD_BINARY_ARGS@ \
181 --with servers --with zfs --without ldiskfs \
182 --rebuild $(PACKAGE)-zfs-dkms-*.src.rpm || exit 1; \
184 --define "_tmppath $$rpmbuilddir/TMP" \
185 --define "_topdir $$rpmbuilddir" \
186 @RPMBUILD_BINARY_ARGS@ \
187 --with servers --without zfs --with ldiskfs \
188 --rebuild $(PACKAGE)-ldiskfs-dkms-*.src.rpm || exit 1; \
190 --define "_tmppath $$rpmbuilddir/TMP" \
191 --define "_topdir $$rpmbuilddir" \
192 @RPMBUILD_BINARY_ARGS@ \
193 --with servers --with zfs --with ldiskfs \
194 --rebuild $(PACKAGE)-all-dkms-*.src.rpm || exit 1; \
195 cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \
199 dkms-srpm: $(PACKAGE)-dkms.spec dist Makefile
200 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
201 $(MAKE) $(AM_MAKEFLAGS) \
202 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
204 --define "_tmppath $$rpmbuilddir/TMP" \
205 --define "_topdir $$rpmbuilddir" \
206 --define "_sourcedir $(top_srcdir)" \
208 --bs $(PACKAGE)-dkms.spec || exit 1; \
209 cp $$rpmbuilddir/SRPMS/*.src.rpm $(top_srcdir) || exit 1; \
213 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
215 --define "_tmppath $$rpmbuilddir/TMP" \
216 --define "_topdir $$rpmbuilddir" \
217 @RPMBUILD_BINARY_ARGS@ \
219 --rebuild $(PACKAGE)-client-dkms-*.src.rpm || exit 1; \
220 cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \
225 dkms-srpms: dkms-srpm
230 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
231 if test "x@CONFIG_CACHE_FILE@" != "x"; then \
232 export CONFIG_CACHE_FILE="@CONFIG_CACHE_FILE@"; \
234 $(MAKE) $(AM_MAKEFLAGS) \
235 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
237 --define "_tmppath $$rpmbuilddir/TMP" \
238 --define "_topdir $$rpmbuilddir" \
239 @RPMBUILD_BINARY_ARGS@ \
240 --rebuild $(distdir)-*.src.rpm || exit 1; \
241 cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \
244 srpm: @PACKAGE_TARNAME@.spec dist Makefile
245 rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \
246 $(MAKE) $(AM_MAKEFLAGS) \
247 rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \
248 cp $(top_srcdir)/rpm/* $(top_srcdir); \
250 --define "_tmppath $$rpmbuilddir/TMP" \
251 --define "_topdir $$rpmbuilddir" \
252 --define "dist %{nil}" \
253 -ts $(distdir).tar.gz || exit 1; \
254 cp $$rpmbuilddir/SRPMS/$(distdir)-*.src.rpm $(top_srcdir) || exit 1; \
258 export SRC_GIT_HASH=$$(git log --oneline | head -1 | cut -d' ' -f1); \
259 rm -f /usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2; \
260 if test -f /usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2; then \
261 echo "************************************************************" ; \
262 echo "WARNING: move or remove /usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2" ; \
263 echo "************************************************************" ; \
266 # In the debs target, first make sure what's in the changelog reflects
267 # the software version.
268 debs: undef.h debs_common
269 cp -v debian/changelog.in debian/changelog ; \
270 export SRC_GIT_HASH=$$(git log --oneline | head -1 | cut -d' ' -f1); \
271 lversion=$$(echo @VERSION@ | tr '_' '-'); \
272 cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
273 if [ "$$lversion" != "$$cversion" ]; then \
274 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; \
277 if test "x@ENABLE_SERVER@" = "xyes"; then \
278 DEB_BUILD_PROFILES="server"; \
280 DEB_BUILD_PROFILES="client"; \
282 if test "x@ENABLE_LDISKFS@" = "xyes"; then \
283 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} ldiskfs"; \
285 if test "x@ENABLE_ZFS@" = "xyes"; then \
286 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} zfs"; \
287 export SPL_SRC="@SPL@"; \
288 export ZFS_SRC="@ZFS@"; \
289 echo "ZFS support is enabled. Will expect pre-compiled SPL and ZFS sources in:"; \
290 echo "SPL: $${SPL_SRC}"; \
291 echo "ZFS: $${ZFS_SRC}"; \
293 if test "x@ENABLEO2IB@" != "xno"; then \
294 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} o2ib"; \
295 export O2IB_SRC="@O2IBPATH@"; \
297 if test "x@CONFIG_CACHE_FILE@" != "x"; then \
298 export CONFIG_CACHE_FILE="@CONFIG_CACHE_FILE@"; \
300 if test "x@ENABLE_GSS@" = "xyes"; then \
301 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gss"; \
302 debiantmp=$$(mktemp -t -d debbuild-$$USER-XXXXXXXX) ; \
303 cp debian/control $$debiantmp/control.bkp ; \
304 cp debian/control.main $$debiantmp/control.main.bkp ; \
305 cp debian/control.modules.in $$debiantmp/control.modules.in.bkp ; \
306 sed -i "s+^\(Build-Depends: .*\)$$+\1, libkrb5-dev, libssl-dev+" debian/control.main ; \
307 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 ; \
308 sed -i "s+^\(Build-Depends: .*\)$$+\1, libkrb5-dev, libssl-dev+" debian/control.modules.in ; \
309 elif test "x@ENABLE_GSS@" = "xno"; then \
310 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogss"; \
312 if test "x@ENABLE_CRYPTO@" = "xyes"; then \
313 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} crypto"; \
314 elif test "x@ENABLE_CRYPTO@" = "xno"; then \
315 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nocrypto"; \
317 if test "x@systemdsystemunitdir@" != "x"; then \
318 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} systemd"; \
320 if test "x@ENABLE_PINGER@" = "xyes"; then \
321 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} pinger"; \
322 elif test "x@ENABLE_PINGER@" = "xno"; then \
323 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopinger"; \
325 if test "x@ENABLE_CHECKSUM@" = "xyes"; then \
326 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} checksum"; \
327 elif test "x@ENABLE_CHECKSUM@" = "xno"; then \
328 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nochecksum"; \
330 if test "x@ENABLE_FLOCK@" = "xyes"; then \
331 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} flock"; \
332 elif test "x@ENABLE_FLOCK@" = "xno"; then \
333 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noflock"; \
335 if test "x@ENABLE_HEALTH_WRITE@" = "xyes"; then \
336 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} health_write"; \
337 elif test "x@ENABLE_HEALTH_WRITE@" = "xno"; then \
338 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nohealth_write"; \
340 if test "x@ENABLE_LRU_RESIZE@" = "xyes"; then \
341 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} lru-resize"; \
342 elif test "x@ENABLE_LRU_RESIZE@" = "xno"; then \
343 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolru-resize"; \
345 if test "x@ENABLE_MINDF@" = "xyes"; then \
346 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} mindf"; \
347 elif test "x@ENABLE_MINDF@" = "xno"; then \
348 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nomindf"; \
350 if test "x@ENABLE_FAIL_ALLOC@" = "xyes"; then \
351 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} fail-alloc"; \
352 elif test "x@ENABLE_FAIL_ALLOC@" = "xno"; then \
353 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nofail-alloc"; \
355 if test "x@ENABLE_INVARIANTS@" = "xyes"; then \
356 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} invariants"; \
357 elif test "x@ENABLE_INVARIANTS@" = "xno"; then \
358 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noinvariants"; \
360 if test "x@ENABLE_LU_REF@" = "xyes"; then \
361 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} lu_ref"; \
362 elif test "x@ENABLE_LU_REF@" = "xno"; then \
363 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolu_ref"; \
365 if test "x@ENABLE_PGSTAT_TRACK@" = "xyes"; then \
366 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} pgstate-track"; \
367 elif test "x@ENABLE_PGSTAT_TRACK@" = "xno"; then \
368 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopgstate-track"; \
370 if test "x@ENABLE_LIBCFS_CDEBUG@" = "xyes"; then \
371 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-cdebug"; \
372 elif test "x@ENABLE_LIBCFS_CDEBUG@" = "xno"; then \
373 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-cdebug"; \
375 if test "x@ENABLE_LIBCFS_TRACE@" = "xyes"; then \
376 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-trace"; \
377 elif test "x@ENABLE_LIBCFS_TRACE@" = "xno"; then \
378 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-trace"; \
380 if test "x@ENABLE_LIBCFS_ASSERT@" = "xyes"; then \
381 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-assert"; \
382 elif test "x@ENABLE_LIBCFS_ASSERT@" = "xno"; then \
383 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-assert"; \
385 if test "x@ENABLE_PANIC_DUMPLOG@" = "xyes"; then \
386 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} panic_dumplog"; \
387 elif test "x@ENABLE_PANIC_DUMPLOG@" = "xno"; then \
388 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopanic_dumplog"; \
390 if test "x@ENABLE_READLINE@" = "xyes"; then \
391 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} readline"; \
392 elif test "x@ENABLE_READLINE@" = "xno"; then \
393 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noreadline"; \
395 if test "x@ENABLE_LIBPTHREAD@" = "xyes"; then \
396 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libpthread"; \
397 elif test "x@ENABLE_LIBPTHREAD@" = "xno"; then \
398 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibpthread"; \
400 if test "x@ENABLE_BACKOFF@" = "xyes"; then \
401 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} backoff"; \
402 elif test "x@ENABLE_BACKOFF@" = "xno"; then \
403 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nobackoff"; \
405 if test "x@ENABLE_GNI@" = "xyes"; then \
406 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gni"; \
407 elif test "x@ENABLE_GNI@" = "xno"; then \
408 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogni"; \
410 if test "x@ENABLE_EFENCE@" = "xyes"; then \
411 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} efence"; \
412 elif test "x@ENABLE_EFENCE@" = "xno"; then \
413 export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noefence"; \
415 export KERNEL_OBJ="$(LINUX_OBJ)"; \
416 export KERNEL_SRC="$(LINUX)"; \
417 echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \
418 echo "Kernel Source: $${KERNEL_SRC}"; \
419 echo "Kernel Object: $${KERNEL_OBJ}"; \
420 if test "x@ENABLEO2IB@" = "xno"; then \
421 export IB_OPTIONS="--with-o2ib=no"; \
423 if test "x@ENABLEO2IB@" != "xyes" && \
424 test -n "@O2IBPATH@"; then \
425 export IB_OPTIONS="--with-o2ib=@O2IBPATH@"; \
427 export IB_OPTIONS="--with-o2ib=yes"; \
430 dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
431 rc=$${PIPESTATUS[0]}; \
432 cp $$debiantmp/control.bkp debian/control || true && \
433 cp $$debiantmp/control.main.bkp debian/control.main || true && \
434 cp $$debiantmp/control.modules.in.bkp debian/control.modules.in || true && \
435 [ $${rc} -gt 1 ] && exit $${rc}; \
438 cp $$debiantmp/control.bkp debian/control || true && \
439 cp $$debiantmp/control.main.bkp debian/control.main || true && \
440 cp $$debiantmp/control.modules.in.bkp debian/control.modules.in || true && \
441 export KPKG_DEST_DIR="$$(pwd)/.." && \
442 version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \
443 rm -rf debian/tmp/modules-deb && \
444 mkdir debian/tmp/modules-deb && \
445 pushd debian/tmp/modules-deb && \
446 dpkg -x ../../../../lustre-source_$${version}_all.deb $$(pwd) && \
448 tar -C usr_src/ -xjf usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2 && \
449 chmod 755 usr_src/modules/lustre/debian/rules && \
450 mkdir -p usr_share_modass && \
451 ln -s /usr/share/modass/include/ usr_share_modass/ && \
452 ln -s /usr/share/modass/packages/ usr_share_modass/ && \
453 echo "lustre" > usr_share_modass/compliant.list && \
454 export MA_DIR=$$(pwd)/usr_share_modass && \
455 KVERS=$${KVERS:-$(LINUXRELEASE)} && \
456 export KSRC_TREE=$(LINUX) && \
457 KSRC=$${KSRC:-$(LINUX_OBJ)} && \
458 TARBALL=$$(realpath usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2) \
459 m-a build $${KSRC:+-k $$KSRC} $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \
461 VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
462 if test "x@ENABLE_SERVER@" = "xyes"; then \
463 DEB_SERVER_PKG="../lustre-resource-agents_$${VER}_*.deb"; \
466 mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \
467 ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \
468 ../lustre-*-utils_$${VER}_*.deb $${DEB_SERVER_PKG} \
469 ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \
470 ../lustre_$${VER}.tar.gz ../lustre-*-modules-$${KVERS}_$${VER}_*.deb \
473 dkms-debs: undef.h debs_common
474 cp -v debian/changelog.in debian/changelog ; \
475 export SRC_GIT_HASH=$$(git log --oneline | head -1 | cut -d' ' -f1); \
476 lversion=$$(echo @VERSION@ | tr '_' '-'); \
477 cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
478 if [ "$$lversion" != "$$cversion" ]; then \
479 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; \
482 export DEB_BUILD_PROFILES="client"; \
483 export KERNEL_OBJ="$(LINUX_OBJ)"; \
484 export KERNEL_SRC="$(LINUX)"; \
485 echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \
486 echo "Kernel Source: $${KERNEL_SRC}"; \
487 echo "Kernel Object: $${KERNEL_OBJ}"; \
488 export BUILD_DKMS="true" && \
489 dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
490 rc=$${PIPESTATUS[0]}; \
491 [ $${rc} -gt 1 ] && exit $${rc}; \
494 VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
496 mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \
497 ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \
498 ../lustre-*-utils_$${VER}_*.deb \
499 ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \
500 ../lustre_$${VER}.tar.gz ../lustre-*-modules-dkms_$${VER}_*.deb \
503 EXTRA_DIST += debian/*
506 CSTKO=/tmp/checkstack.orig
509 [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv -f ${CSTK} ${CSTKO} || true
510 { for MOD in $$(find . -name "*.ko"); do \
511 objdump -d $$MOD | perl contrib/scripts/checkstack.pl; \
512 done } | grep -v " bug " | sort -nr | uniq > ${CSTK}
513 [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -n 30 ${CSTK}
516 [ -f ${CSTK} ] && mv -f ${CSTK} ${CSTKO}
519 rm -f ${CSTK} ${CSTKO}