Messages in this thread | | | From | Andreas Gruenbacher <> | Subject | Re: [RFC] Extending kbuild syntax | Date | Tue, 2 Oct 2007 00:57:07 +0200 |
| |
On Saturday 29 September 2007 22:11, Sam Ravnborg wrote: > The second is the more controversial suggestion. > In several Makefile we have simple if expression of the variants: > if ($(CONFIG_FOO),y) > obj-$(CONFIG_BAR) += fubar.o > endif
Sometimes substitution looks acceptable:
> -nfsd-$(CONFIG_NFSD) := nfsctl.o > -obj-y += $(nfsd-y) $(nfsd-m) > +obj-y-if-$(CONFIG_NFSD) += nfsctl.o
obj-$(CONFIG_NFSD:m=y) += nfsctl.o
But for the nontrivial cases, things get pretty ugly:
> -ifeq ($(CONFIG_PROC_FS),y) > -obj-$(CONFIG_LOCKDEP) += lockdep_proc.o > -endif
obj-$(CONFIG_PROC_FS:y=$(CONFIG_LOCKDEP)) += lockdep_proc.o
Andreas - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |