summaryrefslogtreecommitdiffstats
path: root/module/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'module/Makefile.in')
-rw-r--r--module/Makefile.in27
1 files changed, 23 insertions, 4 deletions
diff --git a/module/Makefile.in b/module/Makefile.in
index 24af81aa7..39acdac20 100644
--- a/module/Makefile.in
+++ b/module/Makefile.in
@@ -12,7 +12,7 @@ obj-m += os/linux/zfs/
INSTALL_MOD_DIR ?= extra
ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
-ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@
+ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@ @NO_FORMAT_ZERO_LENGTH@
ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/kernel
ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/spl
@@ -40,6 +40,11 @@ modules-Linux:
done
$(MAKE) -C @LINUX_OBJ@ M=`pwd` @KERNEL_MAKE@ CONFIG_ZFS=m modules
+# Only pass down gmake -j flag, if used.
+modules-FreeBSD:
+ flags="$$(echo $$MAKEFLAGS | awk -v RS=' ' /^-j/)"; \
+ env MAKEFLAGS="" make $${flags} -f Makefile.bsd
+
modules-unknown:
@true
@@ -55,6 +60,10 @@ clean-Linux:
find . -name '*.ur-safe' -type f -print | xargs $(RM)
+clean-FreeBSD:
+ flags="$$(echo $$MAKEFLAGS | awk -v RS=' ' /^-j/)"; \
+ env MAKEFLAGS="" make $${flags} -f Makefile.bsd clean
+
clean: clean-@ac_system@
modules_install-Linux:
@@ -100,6 +109,11 @@ cscopelist-am: $(am__tagged_files)
fi; \
done >> $(top_builddir)/cscope.files
+modules_install-FreeBSD:
+ @# Install the kernel modules
+ flags="$$(echo $$MAKEFLAGS | awk -v RS=' ' /^-j/)"; \
+ env MAKEFLAGS="" make $${flags} -f Makefile.bsd install
+
modules_install: modules_install-@ac_system@
modules_uninstall-Linux:
@@ -109,11 +123,16 @@ modules_uninstall-Linux:
$(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$objdir; \
done
+modules_uninstall-FreeBSD:
+ @false
+
modules_uninstall: modules_uninstall-@ac_system@
distdir:
list='$(obj-m)'; for objdir in $$list; do \
- (cd @top_srcdir@/module && find $$objdir \
- -name '*.c' -o -name '*.h' -o -name '*.S' | \
- xargs -r cp --parents -t @abs_top_builddir@/module/$$distdir); \
+ (cd @top_srcdir@/module && find $$objdir -name '*.[chS]' | \
+ while read path; do \
+ mkdir -p @abs_top_builddir@/module/$$distdir/$${path%/*}; \
+ cp $$path @abs_top_builddir@/module/$$distdir/$$path; \
+ done); \
done