Undefined symbols in the kernel modules are not currently detected
at build time. As a result, buildbot may indicate success while
the resulting kernel modules are unusable.
In the kernel build process, modpost warns about missing symbols
but does not return an error in the case of external modules.
Detect these warnings and cause the libafs build to fail.
Change-Id: I2c428a5ce7e3a0d10178679f789b3d787719c397
Reviewed-on: http://gerrit.openafs.org/8981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
+AFS_OS_CLEAN = .makelog
+
# OS specific object files:
AFS_OS_OBJS = \
osi_alloc.o \
.FORCE:
${LINUX_LIBAFS_NAME}.ko afspag.ko: .FORCE
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
- env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
+ env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules 2>&1 | tee .makelog
+ @if [ `grep ^WARNING .makelog | wc -l` -ne 0 ]; then \
+ echo Error: Undefined symbols in modules ; \
+ rm .makelog \
+ exit 1 ; \
+ fi
+ rm .makelog
<all -linux26 -linux_26 -umlinux26>
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)