cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
fi
+if BUILD_MODULES
$(MAKE) -C $(MODULE_PLAYGROUND)
+else
+ $(MAKE) -C $(MODULE_PLAYGROUND) FAKE_BUILD=1
+endif
+
rootfs: build-module-playground
$(CREATE_ROOTFS)
[], enable_manpages=yes)
AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" = "xyes"])
+AC_ARG_ENABLE([test-modules],
+ AS_HELP_STRING([--disable-test-modules], [disable building test modules during make check: cached modules will be used @<:@default=enabled@:>@]),
+ [], enable_test_modules=yes)
+AM_CONDITIONAL([BUILD_MODULES], [test "x$enable_test_modules" = "xyes"])
+
AC_ARG_ENABLE([logging],
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
[], enable_logging=yes)
coverage: ${enable_coverage}
doc: ${enable_gtk_doc}
man: ${enable_manpages}
+ test-modules: ${enable_test_modules}
])
# 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))
$(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)