Re: [PATCH] more procfs bits for !CONFIG_MMU

From: Sam Ravnborg (sam@ravnborg.org)
Date: Thu Jan 02 2003 - 11:29:56 EST


On Wed, Jan 01, 2003 at 11:58:42PM +0000, Christoph Hellwig wrote:
> > Isn't it much nicer to just write this something like
> >
> > proc-mmu-y = proc_mmu.o
> > proc-mmu-n = proc_nommu.o
> >
> > obj-y += $(proc-mmu-$(CONFIG_MMU))
> >
> > instead, and avoid conditionals?
>
> Could be done. Maybe Kai even has an even nicer generic version? :)
Here's my try:
Old makefile:
proc-objs := inode.o root.o base.o generic.o array.o \
                kmsg.o proc_tty.o proc_misc.o kcore.o

ifeq ($(CONFIG_PROC_DEVICETREE),y)
proc-objs += proc_devtree.o
endif

New Makefile:
proc-y := proc_mmu.o
proc-$(CONFIG_MMU) := proc_nommu.o

proc-y += inode.o root.o base.o generic.o array.o \
          kmsg.o proc_tty.o proc_misc.o kcore.o

proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o

Untested...

        Sam
-
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/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:17 EST