NetBSD Problem Report #31934

From dholland@eecs.harvard.edu  Fri Oct 28 05:10:03 2005
Return-Path: <dholland@eecs.harvard.edu>
Received: from tanaqui.eecs.harvard.edu (tanaqui.eecs.harvard.edu [140.247.60.239])
	by narn.netbsd.org (Postfix) with ESMTP id D219663B8C2
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 28 Oct 2005 05:10:02 +0000 (UTC)
Message-Id: <20051028050939.11487F8C7@tanaqui.eecs.harvard.edu>
Date: Fri, 28 Oct 2005 01:09:39 -0400 (EDT)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@netbsd.org
Subject: toplevel cleandir doesn't honor MKX11=yes
X-Send-Pr-Version: 3.95

>Number:         31934
>Category:       misc
>Synopsis:       toplevel cleandir doesn't honor MKX11=yes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 28 05:11:00 +0000 2005
>Last-Modified:  Thu Jun 03 05:05:01 +0000 2010
>Originator:     David A. Holland <dholland@eecs.harvard.edu>
>Release:        NetBSD 3.99.10 (-20051026)
>Organization:
   Harvard EECS
>Environment:
System: NetBSD tanaqui 3.99.10 NetBSD 3.99.10 (TANAQUI) #3: Wed Oct 26 18:52:27 EDT 2005 root@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:
	Today for the heck of it I did a 'make cleandir' from /usr/src,
	(instead of the simpler rm -rf /usr/obj) and noticed that it doesn't
	clean out /usr/obj/x11, even though I have MKX11=yes set in mk.conf.

	This presumably also applies to the other toplevel targets.

>How-To-Repeat:
	set MKX11=yes, make cleandir

>Fix:
	The simple solution would be to put

	.if ${MKX11} != "no"
	SUBDIR+=x11
	.endif

	at some suitable place in the toplevel makefile, probably
	right after the rest of the setting of SUBDIR.

	However, this by itself would cause the build to go through
	src/x11 twice. The special entry for x11 in BUILDTARGETS needs
	to be removed to correspond.

	I'm not sure if this is actually a good idea. It seems like it
	might be opening a can of worms, at least in the short term.

	The alternative (adding extra special-case hacks for the clean
	and cleandir targets) is almost certainly a bad idea, so if it
	comes to that, kill the PR. :-)

>Audit-Trail:
From: Sergey Svishchev <svs+pr@grep.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/31934
Date: Sun, 22 Apr 2007 17:26:31 +0400

 Dup of 29745.

 -- 
 Sergey Svishchev

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/31934: toplevel cleandir doesn't honor MKX11=yes
Date: Thu, 3 Jun 2010 03:00:03 +0000

 comments please:

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/src/Makefile,v
 retrieving revision 1.276
 diff -u -r1.276 Makefile
 --- Makefile	13 Dec 2009 09:29:27 -0000	1.276
 +++ Makefile	3 Jun 2010 02:57:00 -0000
 @@ -490,6 +490,14 @@
  	@false
  .endif

 +.if (make(cleandir) || make(obj) || make(includes)) && ${MKX11} != "no"
 +.if ${X11FLAVOUR} == "Xorg"
 +SUBDIR+=	external/mit/xorg
 +.else
 +SUBDIR+=	x11
 +.endif
 +.endif
 +
  do-extsrc: .PHONY .MAKE
  .if ${MKEXTSRC} != "no"
  	${MAKEDIRTARGET} extsrc build
 @@ -498,6 +506,11 @@
  	@false
  .endif

 +.if (make(cleandir) || make(obj) || make(includes)) && ${MKEXTSRC} != "no"
 +SUBDIR+=	extsrc
 +.endif
 +
 +
  do-obsolete: .PHONY .MAKE
  	${MAKEDIRTARGET} etc install-obsolete-lists


 -- 
 David A. Holland
 dholland@netbsd.org

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, dholland@eecs.harvard.edu
Subject: re: misc/31934: toplevel cleandir doesn't honor MKX11=yes
Date: Thu, 03 Jun 2010 14:58:17 +1000

 thanks for looking at this.  it bothers me at times.

 something to avoid the "make obj" in the x11 build itself would be nice.

 either some explicit hacky variable that build.sh or src/Makefile sets
 and the x11 Makefile::build target notices, or, simply removing the
 obj from the x11 build target... seems better than just this.


 .mrg.

From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/31934: toplevel cleandir doesn't honor MKX11=yes
Date: Thu, 3 Jun 2010 07:03:54 +0200

 On Thu, Jun 03, 2010 at 02:58:17PM +1000, matthew green wrote:
 > 
 > thanks for looking at this.  it bothers me at times.
 > 
 > something to avoid the "make obj" in the x11 build itself would be nice.

 I use the following patch instead for a long time:

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/src/external/Makefile,v
 retrieving revision 1.8
 diff -b -u -r1.8 Makefile
 --- Makefile	5 Oct 2009 22:44:26 -0000	1.8
 +++ Makefile	3 Jun 2010 05:02:23 -0000
 @@ -4,4 +4,10 @@

  SUBDIR+= apache2 bsd intel-fw-eula intel-fw-public gpl2 gpl3 ibm-public intel-public cddl

 +.include <bsd.own.mk>
 +
 +.if ${MKX11} != "no" && ${X11FLAVOUR} == "Xorg"
 +SUBDIR+= mit/xorg
 +.endif
 +
  .include <bsd.subdir.mk>

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.