From: Etienne Dechamps Date: Thu, 5 Jul 2012 08:23:42 +0000 (+0200) Subject: Use MODULE variable in module Makefile like zfs. X-Git-Tag: spl-0.6.0-rc10~5^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94aac9c9bcd1a222ac87d7452afa5284c16229bc;p=spl Use MODULE variable in module Makefile like zfs. In zfs, each module Makefile contains a MODULE variable which contains the name of the module, and the following declarations reference this variable. In spl, there is a MODULES variable which is never used. Rename it to MODULE and use it like in zfs. This improves consistency between the two build systems. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Issue zfsonlinux/zfs#851 --- diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in index 4f54f12..7e8aac5 100644 --- a/module/spl/Makefile.in +++ b/module/spl/Makefile.in @@ -1,29 +1,29 @@ # Makefile.in for spl kernel module -MODULES := spl +MODULE := spl EXTRA_CFLAGS = @KERNELCPPFLAGS@ EXTRA_CFLAGS += -I@abs_top_srcdir@/include EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h # Solaris porting layer module -obj-m := spl.o +obj-m := $(MODULE).o -spl-objs += @top_srcdir@/module/spl/spl-debug.o -spl-objs += @top_srcdir@/module/spl/spl-proc.o -spl-objs += @top_srcdir@/module/spl/spl-kmem.o -spl-objs += @top_srcdir@/module/spl/spl-thread.o -spl-objs += @top_srcdir@/module/spl/spl-taskq.o -spl-objs += @top_srcdir@/module/spl/spl-rwlock.o -spl-objs += @top_srcdir@/module/spl/spl-vnode.o -spl-objs += @top_srcdir@/module/spl/spl-err.o -spl-objs += @top_srcdir@/module/spl/spl-time.o -spl-objs += @top_srcdir@/module/spl/spl-kobj.o -spl-objs += @top_srcdir@/module/spl/spl-generic.o -spl-objs += @top_srcdir@/module/spl/spl-atomic.o -spl-objs += @top_srcdir@/module/spl/spl-mutex.o -spl-objs += @top_srcdir@/module/spl/spl-kstat.o -spl-objs += @top_srcdir@/module/spl/spl-condvar.o -spl-objs += @top_srcdir@/module/spl/spl-xdr.o -spl-objs += @top_srcdir@/module/spl/spl-cred.o -spl-objs += @top_srcdir@/module/spl/spl-tsd.o -spl-objs += @top_srcdir@/module/spl/spl-zlib.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-debug.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-vnode.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-err.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-time.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kobj.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-generic.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-atomic.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-mutex.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-kstat.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-condvar.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-xdr.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-cred.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-tsd.o +$(MODULE)-objs += @top_srcdir@/module/spl/spl-zlib.o diff --git a/module/splat/Makefile.in b/module/splat/Makefile.in index 8340b70..05007d4 100644 --- a/module/splat/Makefile.in +++ b/module/splat/Makefile.in @@ -1,27 +1,27 @@ # Makefile.in for splat kernel module -MODULES := splat +MODULE := splat EXTRA_CFLAGS = @KERNELCPPFLAGS@ EXTRA_CFLAGS += -I@abs_top_srcdir@/include EXTRA_CFLAGS += -include @abs_top_builddir@/spl_config.h # Solaris Porting LAyer Tests -obj-m := splat.o +obj-m := $(MODULE).o -splat-objs += @top_srcdir@/module/splat/splat-ctl.o -splat-objs += @top_srcdir@/module/splat/splat-kmem.o -splat-objs += @top_srcdir@/module/splat/splat-taskq.o -splat-objs += @top_srcdir@/module/splat/splat-random.o -splat-objs += @top_srcdir@/module/splat/splat-mutex.o -splat-objs += @top_srcdir@/module/splat/splat-condvar.o -splat-objs += @top_srcdir@/module/splat/splat-thread.o -splat-objs += @top_srcdir@/module/splat/splat-rwlock.o -splat-objs += @top_srcdir@/module/splat/splat-time.o -splat-objs += @top_srcdir@/module/splat/splat-vnode.o -splat-objs += @top_srcdir@/module/splat/splat-kobj.o -splat-objs += @top_srcdir@/module/splat/splat-atomic.o -splat-objs += @top_srcdir@/module/splat/splat-list.o -splat-objs += @top_srcdir@/module/splat/splat-generic.o -splat-objs += @top_srcdir@/module/splat/splat-cred.o -splat-objs += @top_srcdir@/module/splat/splat-zlib.o -splat-objs += @top_srcdir@/module/splat/splat-linux.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-ctl.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-kmem.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-taskq.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-random.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-mutex.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-condvar.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-thread.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-rwlock.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-time.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-vnode.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-kobj.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-atomic.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-list.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-generic.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-cred.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-zlib.o +$(MODULE)-objs += @top_srcdir@/module/splat/splat-linux.o