On Fri, 2009-05-22 at 16:24 -0500, Erik Lotspeich wrote:
> I have a question about recursive make.  I have the FSF GNU Make book by
> Richard Stallman & Roland McGrath (covering Make version 3.77).  In this
> book, it describes the following as equivalent:
> 
> cd dirname && $(MAKE)
> $(MAKE) -C dirname
> 
> It seems that these are not equivalent, however.  When integrating a
> Makefile system with the Linux Kernel build system, these two forms have
> different effects.  The first form works; the second form doesn't.

They are equivalent.  You never explain what "doesn't work" about the
second form so there's no way we can help you.

> module: mymodule.c
>         make -C $(KDIR) M=$(PWD) PWD=$(PWD) module

Note that "make -C $(KDIR)" is NOT EQUIVALENT TO "$(MAKE) -C $(KDIR)".
FWIW.

> Any help sorting this out would be greatly appreciated.

Sorting _what_ out?  You haven't shown us the actual make rule you are
using, and you haven't described the behavior you're seeing that's
causing you to conclude that it "doesn't work".

And, you haven't told us what version of GNU make you're using.



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to