linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jay Cliburn <jacliburn@bellsouth.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Allow (O=...) from file
Date: Thu, 6 Dec 2007 22:38:29 +0100	[thread overview]
Message-ID: <20071206213829.GB24807@uranus.ravnborg.org> (raw)
In-Reply-To: <20071205213126.43548ccf@osprey.hogchain.net>

On Wed, Dec 05, 2007 at 09:31:26PM -0600, Jay Cliburn wrote:
> On Wed, 5 Dec 2007 22:00:03 +0100
> Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > On Tue, Dec 04, 2007 at 09:04:33PM -0600, Jay Cliburn wrote:
> > > Sam,
> > > 
> > > This piece of the top-level Makefile in current git causes an
> > > out-of-tree driver Makefile to fail.
> > > 
> > > 101 ifdef O
> > > 102   ifeq ("$(origin O)", "command line")
> > > 103     KBUILD_OUTPUT := $(O)
> > > 104   endif
> > > 105 endif
> > > 
> > > The out-of-tree driver Makefile contains an O=... directive that
> > > (correctly) does _not_ specify the kernel source dir, and apparently
> > > isn't overridden by the command line either. If in the above
> > > Makefile snippet I change "command line" to "file", my out-of-tree
> > > make succeeds. What do you think about allowing O= to come from a
> > > file in addition to the command line?
> > 
> > When you change "command line" to "file" you actually makes kbuild
> > ignore the O=... value which is why it succeeds.
> 
> I'm puzzled by your statement.  Isn't the opposite true?  When using
> "command line", doesn't the following happen?
> 
> 1. My makefile sets O=/foo
It does so as an argument to make so it is considered "command line" by make.
> 2. My makefile invokes your makefile with O=/foo
> 3. Your makefile ignores my O=/foo because it requires O=/foo to
> originate from the command line
It comes from the command line in your case.
> 4. KBUILD_OUTPUT never gets set to /foo and we hit the error
We hit the error because kbuild see the srctree and objtree points at the
same directory so outputmakefile will overwrite the kernel Makefile
if it is writeable.

> OTOH, if I use "file":
Then you never get KBUILD_OUTPUT set.
Try adding a:
$(warning origin=$(origin O))
just above the lines with the check that fails.

I will try to fix this during the weeken - but Linux time is sparse these days.

	Sam

  reply	other threads:[~2007-12-06 21:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05  3:04 Allow (O=...) from file Jay Cliburn
2007-12-05 20:02 ` Erik Mouw
2007-12-05 21:00 ` Sam Ravnborg
2007-12-05 21:37   ` Erik Mouw
2007-12-05 21:49     ` Erik Mouw
2007-12-06  3:31   ` Jay Cliburn
2007-12-06 21:38     ` Sam Ravnborg [this message]
2007-12-08 20:14     ` Sam Ravnborg
2007-12-09  0:25       ` Jay Cliburn
2007-12-06 14:57 ` Jan Engelhardt
2007-12-07  0:24   ` Jay Cliburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071206213829.GB24807@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=jacliburn@bellsouth.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).