From owner-freebsd-bugs Fri Jan 17 5: 0:24 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1BF037B405 for ; Fri, 17 Jan 2003 05:00:17 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3342A43F13 for ; Fri, 17 Jan 2003 05:00:17 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0HD0GNS043689 for ; Fri, 17 Jan 2003 05:00:16 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0HD0GKG043688; Fri, 17 Jan 2003 05:00:16 -0800 (PST) Date: Fri, 17 Jan 2003 05:00:16 -0800 (PST) Message-Id: <200301171300.h0HD0GKG043688@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Lukas Ertl Subject: Re: bin/47149: make -C documented but not working - [PATCH] Reply-To: Lukas Ertl Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/47149; it has been noted by GNATS. From: Lukas Ertl To: freebsd-gnats-submit@FreeBSD.org Cc: uk@univie.ac.at Subject: Re: bin/47149: make -C documented but not working - [PATCH] Date: Fri, 17 Jan 2003 13:50:37 +0100 (CET) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-611245315-1042807837=:18530 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE The problem of "make -C" on 4-STABLE is just a missing char in the OPTFLAGS string (this must have happened when MFC'ing the -C option). The problem of "make -C" on both 4-STABLE _and_ 5-CURRENT is that it simply doesn't work correctly, because the current program flow of "make" sets the essential .CURDIR and .OBJDIR Makefile vars _before_ chdir()'ing to the directory given as -C parameter. The attached patch is just moving around some code, but it seems to correct the problem. I don't have enough knowledge of the make internals to be sure that it doesn't have any nasty side effects, so please review it closely. best regards, le --=20 Lukas Ertl eMail: l.ertl@univie.ac.at UNIX-Systemadministrator Tel.: (+43 1) 4277-14073 Zentraler Informatikdienst (ZID) Fax.: (+43 1) 4277-9140 der Universit=E4t Wien http://mailbox.univie.ac.at/~le/ --0-611245315-1042807837=:18530 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="make.patch" Content-Transfer-Encoding: BASE64 Content-ID: <20030117135037.R18530@pcle2.cc.univie.ac.at> Content-Description: Content-Disposition: attachment; filename="make.patch" LS0tIHNyYy91c3IuYmluL21ha2UvbWFpbi5jCUZyaSBKYW4gMTcgMTM6MzA6 MzAgMjAwMw0KKysrIHNyYy91c3IuYmluL21ha2UvbWFpbi5jLm5ldwlGcmkg SmFuIDE3IDEzOjM5OjU3IDIwMDMNCkBAIC00ODQsMTcgKzQ4NCw2IEBADQog CQl9DQogCX0NCiAjZW5kaWYNCi0JLyoNCi0JICogRmluZCB3aGVyZSB3ZSBh cmUuLi4NCi0JICogQWxsIHRoaXMgY29kZSBpcyBzbyB0aGF0IHdlIGtub3cg d2hlcmUgd2UgYXJlIHdoZW4gd2Ugc3RhcnQgdXANCi0JICogb24gYSBkaWZm ZXJlbnQgbWFjaGluZSB3aXRoIHBtYWtlLg0KLQkgKi8NCi0JY3VyZGlyID0g Y2RwYXRoOw0KLQlpZiAoZ2V0Y3dkKGN1cmRpciwgTUFYUEFUSExFTikgPT0g TlVMTCkNCi0JCWVycigyLCBOVUxMKTsNCi0NCi0JaWYgKHN0YXQoY3VyZGly LCAmc2EpID09IC0xKQ0KLQkgICAgZXJyKDIsICIlcyIsIGN1cmRpcik7DQog DQogI2lmIGRlZmluZ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yY2hQYXRoLCBjdXJk aXIpOw0KKwlWYXJfU2V0KCIuQ1VSRElSIiwgY3VyZGlyLCBWQVJfR0xPQkFM KTsNCisJVmFyX1NldCgiLk9CSkRJUiIsIG9iamRpciwgVkFSX0dMT0JBTCk7 DQogDQogCS8qDQogCSAqIEJlIGNvbXBhdGlibGUgaWYgdXNlciBkaWQgbm90 IHNwZWNpZnkgLWogYW5kIGRpZCBub3QgZXhwbGljaXRseQ0K --0-611245315-1042807837=:18530-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message