Re: Linus's include file strategy redux

From: Peter Samuelson (peter@cadcamlab.org)
Date: Sat Dec 16 2000 - 21:18:37 EST


  [Peter Samuelson]
> > make -C /lib/modules/`uname -r`/build modules SUBDIRS=$(pwd)

[Miquel van Smoorenburg]
> Excellent. Is there any way to put his in a Makefile?

I don't know why not. Here's what I would start with:

  PWD := $(shell pwd)
  KERNEL := /lib/modules/$(shell uname -r)/build
  CALLMAKE = $(MAKE) -C $(KERNEL) SUBDIRS=$(PWD)

  all:
          # ...other stuff...
          $(CALLMAKE) modules

  install:
          # ...other stuff...
          $(CALLMAKE) modules_install

  # ...other stuff...
  include $(TOPDIR)/Rules.make

Not *quite* that simple, but it's a start. Note that with this
construction you let the savvy user override $(KERNEL) at the command
line. (I, for one, would insist.)

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 23 2000 - 21:00:18 EST