From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 1 00:40:22 2004 Return-Path: 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 7CCC816A4CE for ; Thu, 1 Jul 2004 00:40:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F49E43D1D for ; Thu, 1 Jul 2004 00:40:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i610eL2E020291 for ; Thu, 1 Jul 2004 00:40:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i610eLpd020288; Thu, 1 Jul 2004 00:40:21 GMT (envelope-from gnats) Date: Thu, 1 Jul 2004 00:40:21 GMT Message-Id: <200407010040.i610eLpd020288@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Subject: Re: bin/68534: make(1) - ${.MAKEFLAGS} does not contain cmd line args X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 00:40:22 -0000 The following reply was made to PR bin/68534; it has been noted by GNATS. From: Giorgos Keramidas To: "John E. Hein" Cc: bug-followup@freebsd.org Subject: Re: bin/68534: make(1) - ${.MAKEFLAGS} does not contain cmd line args Date: Thu, 1 Jul 2004 03:37:25 +0300 On 2004-06-30 17:36, "John E. Hein" wrote: > MAKEFLAGS env variable & .MAKEFLAGS make variable does not contain command > line args as specified in make(1). This is not a bug. The keyword is "may". If you set .MAKEFLAGS in your Makefile or MAKEFLAGS in the environment than make(1) *will* *pass* these to child processes (as the value of MAKEFLAGS in the environment). Not setting MAKEFLAGS is not an error, but does not imply that something related to make's invocation will get passed in the environment. Here's an an example: : giorgos@gothmog:/tmp/maketest$ cat Makefile : SUBDIR= alpha : : .MAKEFLAGS= WITHOUT_X11=YES : : all: : @echo "MFLAGS : ${MFLAGS}" : @echo "MAKEFLAGS : ${MAKEFLAGS}" : @echo ".MAKEFLAGS : ${.MAKEFLAGS}" : : .include : giorgos@gothmog:/tmp/maketest$ cat alpha/Makefile : all: : @echo "MFLAGS : ${MFLAGS}" : @echo "MAKEFLAGS : ${MAKEFLAGS}" : @echo ".MAKEFLAGS : ${.MAKEFLAGS}" : : giorgos@gothmog:/tmp/maketest$ make WITHOUT_X11=NO : MFLAGS : WITHOUT_X11=YES : MAKEFLAGS : WITHOUT_X11=YES : .MAKEFLAGS : WITHOUT_X11=YES : ===> alpha : MFLAGS : : MAKEFLAGS : WITHOUT_X11=YES : .MAKEFLAGS : : giorgos@gothmog:/tmp/maketest$ Note how WITHOUT_X11=NO in the command line does not have any effect because ./Makefile sets .MAKEFLAGS to something different. But the correct value *is* propagated as expected to alpha/Makefile. If there is a bug here it's in what is described in the manpage as: MFLAGS A synonym for .MAKEFLAGS provided for backward compatibility. which isn't quite true AFAICT, since MFLAGS includes the value of .MAKEFLAGS when the latter is set but not vice versa. - Giorgos