Date: Sun, 11 Apr 2010 16:11:42 +0800 From: Lin Jui-Nan Eric <ericlin@tamama.org> To: stable@freebsd.org Subject: Different behavior of make(1) between command line argument and .MAKEFLAGS special target Message-ID: <y2q47713ee11004110111qa41449eat7ad0a3b1b5b73767@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi listers,
Recently I found that there's different behavior of specifying -j1 in
command line argument and special target ".MAKEFLAGS".
According to section "SPECIAL TARGETS" in manpage of make(1):
.MAKEFLAGS This target provides a way to specify flags for make when the
makefile is used. The flags are as if typed to the shell,
though the -f option will have no effect. Flags (except for
-f) and variable assignments specified as the source for this
target are also appended to the .MAKEFLAGS internal variable.
Please note the difference between this target and the
.MAKEFLAGS internal variable: specifying an option or variable
assignment as the source for this target will affect
both the current makefile and all processes that make executes.
The behavior should be same while specifying flags in Makefile and
typed to the shell.
But when I try to set "-j" in Makefile, the behavior is different.
I have filed a PR and send a patch
(http://www.freebsd.org/cgi/query-pr.cgi?pr=144388).
Any suggestion is welcomed.
Sincerely,
Jui-Nan Eric Lin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?y2q47713ee11004110111qa41449eat7ad0a3b1b5b73767>
