[lkml]   [2004]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: current BK compilation failure on ppc32

On Sat, 3 Jul 2004, Christoph Hellwig wrote:
> kernel/power/smp.c seems to be inherently swsusp-specific but is
> compiled for CONFIG_PM. (Same seems to be true for amny other files
> in kernel/power/, but as they compile it only causes bloat..)
> --- 1.10/kernel/power/Makefile 2004-07-02 07:23:47 +02:00
> +++ edited/kernel/power/Makefile 2004-07-03 22:07:29 +02:00
> @@ -1,5 +1,7 @@
> obj-y := main.o process.o console.o pm.o
> obj-$(CONFIG_SMP) += smp.o
> +endif

Don't do it like that.

Instead, do something like

smp-power-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += $(smp-power-y)

which not only is shorter, but gets a _lot_ more readable after a while.

It's also extremely useful for constructs like "include this file X is
either 'y' or 'm'". From fs/Makefile:


nfsd-$(CONFIG_NFSD) := nfsctl.o
obj-y += $(nfsd-y) $(nfsd-m)


which just means that "nfsctl.o" will be compiled in if nfsd is
compiled-in or a module.

You can make pretty complex decision trees this way - much more readably
than by explicit comparisons.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-11-18 23:46    [W:0.052 / U:0.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site