Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Alexey Kodanev <alexey.kodanev@or...> - 2013-09-19 17:23:47
|
On 19.09.2013 18:45, chrubis@... wrote: > Hi! >>>> Makefile example: >>>> >>>> top_srcdir ?= ../../../.. >>>> >>> Why aren't you including env_pre.mk here? >>> >>> It contains mostly compatibility hack for older Make. >>> >>> Does it break something? >>> >> Yes, I would include it only inside ifeq($(KERNELRELEASE),) otherwise >> make stops in the kernel tree with error "Fix it to use EXTRA_CFLAGS", >> it finds that CFLAGS is not empty... may be we can add >> ifneq($(KERNELRELEASE),) to the "env_pre.mk and "testcases.mk"? > And what about this then: > > Makefile: > > top_srcdir ?= ../../../.. > > include $(top_srcdir)/include/mk/env_pre.mk > > REQ_VERSION_MAJOR := 2 > REQ_VERSION_PATCH := 6 > > MODULE_NAMES := ltp_foo > > include $(top_srcdir)/include/mk/module.mk > include $(top_srcdir)/include/mk/generic_leaf_target.mk > > > > And make module.mk either to set MAKE_TARGETS to the ltp_foo.ko or to be > empty in case we don't want to build anything (which should be NOOP). Sorry, but I didn't get how it'll fix the error mentioned above? I've found that env_pre.mk content can be omitted using variable ENV_PRE_LOADED, I will set it in the module.mk (export), so make should know about it when building modules and it won't be included again. After that the above Makefile can be used. Is it acceptable? Thanks, Alexey |