diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2015-05-31 15:38:47 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2015-05-31 15:38:47 -0300 |
commit | 23603f1f837caeff45c6960722c2cad690db801d (patch) | |
tree | 313f1b145e53cad2555fffb00139477ded99783d /testsuite/module-playground/Makefile | |
parent | 7266ec43371fff8304e730b24729b2c6a95d75c4 (diff) | |
download | kmod-cached-modules.tar.gz |
build: cache modules from playgroundcached-modules
Now that we are able to build our own test modules, also allow to use
cached modules so a) kernel headers are not required and b) distro
maintainers are happy. It's still need a "--disable-test-modules" in
the configure since the default is enabled.
There's no license problems anymore since all modules come from our own
repository, we ship the sources and the modules can be easily rebuilt.
Diffstat (limited to 'testsuite/module-playground/Makefile')
-rw-r--r-- | testsuite/module-playground/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/module-playground/Makefile b/testsuite/module-playground/Makefile index 5ba9ed2..a5f142f 100644 --- a/testsuite/module-playground/Makefile +++ b/testsuite/module-playground/Makefile @@ -38,6 +38,9 @@ else # normal makefile KDIR ?= /lib/modules/`uname -r`/build KVER ?= `uname -r` +ifeq ($(FAKE_BUILD),) + FAKE_BUILD=0 +endif ARCH_SPECIFIC_MODULES := mod-simple-x86_64.ko mod-simple-i386.ko mod-simple-sparc64.ko MY_MODULES := $(filter-out $(ARCH_SPECIFIC_MODULES),$(wildcard *.ko)) @@ -48,8 +51,14 @@ mod-simple-%.ko: mod-simple-%.c Makefile.arch $(eval arch=$(patsubst mod-simple-%.ko,%,$@)) $(MAKE) KDIR=$(KDIR_$(arch)) ARCH=$(arch) CROSS_COMPILE=$(CROSS_COMPILE_$(arch)) -f Makefile.arch +ifeq ($(FAKE_BUILD),0) modules: $(MAKE) -C $(KDIR) M=$$PWD +else +modules: + @echo " CP cache/*.ko" + @cp cache/*.ko . +endif arch-modules: $(ARCH_SPECIFIC_MODULES) |