Re: [RFC] Extending kbuild syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux