On 12/12/2018 11:18, Michael Olbrich wrote:
On Wed, Dec 12, 2018 at 10:42:38AM +0000, Ian Abbott wrote:
If a local package "foo-mod" for a Linux kernel module is selected by a
local tristate configuration option PTXCONF_FOO_MOD, then based on the
template for Linux drivers, it would include the following in its
foo-mod.make file:

ifdef PTXCONF_FOO_MOD
$(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
endif

However, this rule will be invoked even if the PTXCONF_FOO_MOD option
has been configured with the tristate option 'm' and has not been
changed to 'y' by a selected_collectionconfig.  This causes the Linux
kernel module to be built and installed unintentionally.  To prevent
that happening, the above lines in the foo-mod.make file can be changed
as follows (only the conditional test is changed):

ifeq ($(PTXCONF_FOO_MOD),y)
$(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
endif

This patch changes the template for Linux driver packages in accordance
with the above change.

No, this break building if PTXCONF_FOO_MOD=m and no collection is selected.

Untested:

ifneq ($(filter foo-mod,$(PTX_PACKAGES_SELECTED)),)

Michael

Thanks Michael. I tested your change with and without a selected_collectionconfig and it works. I'll submit a v2 patch incorporating your change.

--
-=( Ian Abbott <[email protected]> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268.  Registered address:    )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to