On Mon, 29 Oct 2001 01:44:59 -0600, Peter Samuelson <[EMAIL PROTECTED]> wrote: >*If* we can assume that a 'n' variable will not be '' instead [yes, I >know, we can't assume that at present], the makefile implementation is >trivial: > >ifeq(,$(findstring n,$(CONFIG_FOO)$(CONFIG_BAR)) > ifneq(,$(findstring m,$(CONFIG_FOO)$(CONFIG_BAR))) > # compile as module > else > # compile builtin > endif >endif
That is worse than the existing entries. Do you really want to replace ifsel(CONFIG_SLIP_COMPRESSED) select(CONFIG_SLIP slhc.o) endif with this? ifeq(,$(findstring n,$(CONFIG_SLIP_COMPRESSED)$(CONFIG_SLIP)) ifneq(,$(findstring m,$(CONFIG_SLIP_COMPRESSED)$(CONFIG_SLIP))) # compile as module else # compile builtin endif endif I was hoping to compress the existing three lines to one. select_cond(CONFIG_SLIP_COMPRESSED CONFIG_SLIP slhc.o) The more standardized formats there are in kbuild, the harder it is for users to make mistakes. What they expand to behind the scenes is a seperate question. BTW, the test that handles 'n' as well as '' is ifneq ($(subst n,,$(CONFIG_FOO)$(CONFIG_BAR)),) _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel