[kaos] > >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.
I was talking about the Makefile implementation, not to be confused with the Makefile.in syntax. The Makefile.in entry would still be one line, select() or select_cond() as you see fit. [See below for why I now vote for select().] > ifsel(CONFIG_SLIP_COMPRESSED) > select(CONFIG_SLIP slhc.o) > endif > > I was hoping to compress the existing three lines to one. > > select_cond(CONFIG_SLIP_COMPRESSED CONFIG_SLIP slhc.o) Right, and I *still* don't understand why order matters. If either var is 'n' or '', drop it, else if either var is 'm', compile as module, else compile as builtin. I think just extending select() to handle a case with more than one CONFIG_ argument would be the cleanest approach: (a) I doubt the code to parse this will result in anything significantly harder than just implementating select_cond(); (b) it's one less function for the end users to know; (c) you have not yet convinced me that order has to matter. > BTW, the test that handles 'n' as well as '' is > ifneq ($(subst n,,$(CONFIG_FOO)$(CONFIG_BAR)),) That works... Peter _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel