Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 1997 19:45:08 +0700 (NSS)
From:      "Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/4368: ${MAKE} ${.MAKEFLAGS} is superfluous
Message-ID:  <199708241245.TAA07347@nnd.itfs.nsk.su>
Resent-Message-ID: <199708241240.FAA00650@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4368
>Category:       bin
>Synopsis:       ${MAKE} ${.MAKEFLAGS} is superfluous
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 24 05:40:01 PDT 1997
>Last-Modified:
>Originator:     Nickolay N. Dudorov
>Organization:
NTP Infoteka
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

		FreeBSD 3.0-CURRENT i386

>Description:

	Current src/Makefile contains lines of the form:

	... ${MAKE} ${.MAKEFLAGS} ...

	This construct is not a bug but have no sense at all ;-(
because 'make'

	1) process all options from environment variable "MAKEFLAGS"
AND
	2) sets environment variable "MAKEFLAGS" to the value
	   of make's own variable ".MAKEFLAGS"

>How-To-Repeat:

	Observe this lines of code from src/usr.bin/make/main.c:

/* Next line - 109: */
#define MAKEFLAGS       ".MAKEFLAGS"

/* Next line - 590: */
	/*
	 * First snag any flags out of the MAKE environment variable.
	 * (Note this is *not* MAKEFLAGS since /bin/make uses that and it's
	 * in a different format).
	 */
#ifdef POSIX
	Main_ParseArgLine(getenv("MAKEFLAGS"));
#else
	Main_ParseArgLine(getenv("MAKE"));
#endif

/* Next line - 689: */
	/* Install all the flags into the MAKE envariable. */
	if (((p = Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1)) != NULL) && *p)
#ifdef POSIX
		setenv("MAKEFLAGS", p, 1);
#else
		setenv("MAKE", p, 1);
#endif


>Fix:
	
	Change all "... ${MAKE} ${.MAKEFLAGS} ..." to just
"... ${MAKE} ..." all over the world :-)


>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708241245.TAA07347>