public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Build TAGS problem with O=
@ 2005-07-01 21:45 George Anzinger
  2005-07-06  2:51 ` George Anzinger
  2005-07-06 15:30 ` George Anzinger
  0 siblings, 2 replies; 3+ messages in thread
From: George Anzinger @ 2005-07-01 21:45 UTC (permalink / raw)
  To: lkml

If you try:
make O=/usr/src/ver/2.6.13-rc/obj/ -j5 LOCALVERSION=_2.6.13-rc TAGS ARCH=i386

it fails with:
   MAKE   TAGS
find: security/selinux/include: No such file or directory
find: include: No such file or directory
find: include/asm-i386: No such file or directory
find: include/asm-generic: No such file or directory


The problem seems to be this bit of the topdir Makefile:


#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set
#(which is the most common case IMHO) to avoid unneeded clutter in the big tags 
file.
#Adding $(srctree) adds about 20M on i386 to the size of the output file!

ifeq ($(KBUILD_OUTPUT),)
__srctree =
else
__srctree = $(srctree)/
endif

It would appear that the "ifeq ($(KBUILD_OUTPUT),)" is doing the wrong thing.  I 
am not a make expert, but I have had a lot of BAD experience trying to use this 
construct.  Any one up to proposing a fix?

-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Build TAGS problem with O=
  2005-07-01 21:45 Build TAGS problem with O= George Anzinger
@ 2005-07-06  2:51 ` George Anzinger
  2005-07-06 15:30 ` George Anzinger
  1 sibling, 0 replies; 3+ messages in thread
From: George Anzinger @ 2005-07-06  2:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

George Anzinger wrote:
> If you try:
> make O=/usr/src/ver/2.6.13-rc/obj/ -j5 LOCALVERSION=_2.6.13-rc TAGS 
> ARCH=i386
> 
> it fails with:
>   MAKE   TAGS
> find: security/selinux/include: No such file or directory
> find: include: No such file or directory
> find: include/asm-i386: No such file or directory
> find: include/asm-generic: No such file or directory
> 
> 
> The problem seems to be this bit of the topdir Makefile:
> 
> 
> #We want __srctree to totally vanish out when KBUILD_OUTPUT is not set
> #(which is the most common case IMHO) to avoid unneeded clutter in the 
> big tags file.
> #Adding $(srctree) adds about 20M on i386 to the size of the output file!
> 
> ifeq ($(KBUILD_OUTPUT),)
> __srctree =
> else
> __srctree = $(srctree)/
> endif
> 
> It would appear that the "ifeq ($(KBUILD_OUTPUT),)" is doing the wrong 
> thing.  I am not a make expert, but I have had a lot of BAD experience 
> trying to use this construct.  Any one up to proposing a fix?
> 
The problem appears to be that KBUILD_OUTPUT is NOT defined after make reruns 
itself.  Here is a fix:

Signed-off-by:  George Anzinger  <george@mvista.com>

--- /usr/src/linux-2.6.12-org/Makefile	2005-07-01 14:37:44.000000000 -0700
+++ /usr/src/linux-2.6.13-rc/Makefile	2005-07-05 19:45:00.588314304 -0700
@@ -1149,7 +1149,7 @@
  #(which is the most common case IMHO) to avoid unneeded clutter in the big 
tags file.
  #Adding $(srctree) adds about 20M on i386 to the size of the output file!

-ifeq ($(KBUILD_OUTPUT),)
+ifeq ($(src),$(obj))
  __srctree =
  else
  __srctree = $(srctree)/



-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Build TAGS problem with O=
  2005-07-01 21:45 Build TAGS problem with O= George Anzinger
  2005-07-06  2:51 ` George Anzinger
@ 2005-07-06 15:30 ` George Anzinger
  1 sibling, 0 replies; 3+ messages in thread
From: George Anzinger @ 2005-07-06 15:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

Cleaned up to be a standard "p 1" patch.  Make the comments more concise.


  make O=/dir TAGS

  fails with:

    MAKE   TAGS
  find: security/selinux/include: No such file or directory
  find: include: No such file or directory
  find: include/asm-i386: No such file or directory
  find: include/asm-generic: No such file or directory


  The problem is in this line:
  ifeq ($(KBUILD_OUTPUT),)

KBUILD_OUTPUT is not defined (ever) after make reruns itself.  This line is used 
in the TAGS, tags, and cscope makes.

Here is a fix:

Signed-off-by:  George Anzinger  <george@mvista.com>

--- linux-2.6.12-org/Makefile	2005-07-01 14:37:44.000000000 -0700
+++ linux-2.6.13-rc/Makefile	2005-07-05 19:45:00.588314304 -0700
@@ -1149,7 +1149,7 @@
  #(which is the most common case IMHO) to avoid unneeded clutter in the big
tags file.
  #Adding $(srctree) adds about 20M on i386 to the size of the output file!

-ifeq ($(KBUILD_OUTPUT),)
+ifeq ($(src),$(obj))
  __srctree =
  else
  __srctree = $(srctree)/



-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-06 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-01 21:45 Build TAGS problem with O= George Anzinger
2005-07-06  2:51 ` George Anzinger
2005-07-06 15:30 ` George Anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox