lkml.org 
[lkml]   [2007]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Extending kbuild syntax
Date
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/

\
 
 \ /
  Last update: 2007-10-02 00:59    [from the cache]
©2003-2011 Jasper Spaans