[Top][All Lists]

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

Re: Question about recursive make

From: Paul Smith
Subject: Re: Question about recursive make
Date: Fri, 22 May 2009 18:01:23 -0400

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)".

> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]