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 <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue zfsonlinux/zfs#851
This commit is contained in:
Etienne Dechamps 2012-07-05 10:23:42 +02:00 committed by Brian Behlendorf
parent e8267acd25
commit 94aac9c9bc
2 changed files with 40 additions and 40 deletions

View File

@ -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

View File

@ -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