X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=build%2FRules.in;h=815b3da57c29ede9192619685191129efdeac3d2;hp=293ff3cd65e3958988e769c26e014db90b4f3542;hb=931ae518f564c2ea16677f176dbaa0da2c28897a;hpb=2ec4f8cc2c890edcd2199c92113438c8584b78b7 diff --git a/build/Rules.in b/build/Rules.in index 293ff3c..815b3da 100644 --- a/build/Rules.in +++ b/build/Rules.in @@ -23,12 +23,44 @@ ifeq ($(PATCHLEVEL),) include autoMakefile +# The kernel ABI files for the nonfree modules. +KABIS := $(NONFREE_MODULES:%$(KMODEXT)=%.kabi) + +all: archive-nonfree-modules + +# Where to archive the nonfree modules for binary distribution. +# If this directory has a colon in it, SSH/SCP are used to go out on the network. +nonfreedir := $$HOME/nonfree +#nonfreedir := moraine.clusterfs.com:/home/lustre-nonfree + +# Put the nonfree modules and corresponding KABI files into the binary +# archive. We assume that if the CVS subdirectory doesn't exist, we +# don't want to archive. +archive-nonfree-modules: $(KABIS) $(NONFREE_MODULES) + test -d CVS || exit 0; \ + list="$(NONFREE_MODULES)"; for mod in $$list; do \ + perl $(top_srcdir)/build/kabi -v archive $(nonfreedir) $$mod || exit $$?; \ + done + +# Generate the Kernel ABI files for the nonfree modules. +$(KABIS): $(NONFREE_MODULES) + for mod in $(NONFREE_MODULES); do \ + CC="$(CC)" perl $(top_srcdir)/build/kabi --with-linux="$(LINUX)" module $$mod || exit $$?; \ + done + +fix-kext-ownership: + @if test -d $(DESTDIR)$(kextdir) ; then \ + echo chown -R root:wheel $(DESTDIR)$(kextdir) ; \ + chown -R root:wheel $(DESTDIR)$(kextdir) || \ + echo >&2 "*** WARNING: Could not fix kext ownership for $(DESTDIR)$(kextdir)" ; \ + fi + else include @LINUX_CONFIG@ EXTRA_CFLAGS := $(EXTRA_PRE_CFLAGS) -EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @UML_CFLAGS@ +EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @UML_CFLAGS@ @CFLAGS@ EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS) obj-m := $(patsubst %,%.o,$(MODULES))