From owner-freebsd-stable@FreeBSD.ORG Sun Apr 11 08:40:00 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C6E4106564A for ; Sun, 11 Apr 2010 08:40:00 +0000 (UTC) (envelope-from ericlin@tamama.org) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 53BC78FC0C for ; Sun, 11 Apr 2010 08:40:00 +0000 (UTC) Received: by qyk11 with SMTP id 11so3965543qyk.13 for ; Sun, 11 Apr 2010 01:39:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.231.84 with HTTP; Sun, 11 Apr 2010 01:11:42 -0700 (PDT) X-Originating-IP: [59.120.212.57] Date: Sun, 11 Apr 2010 16:11:42 +0800 Received: by 10.229.190.21 with SMTP id dg21mr3568891qcb.69.1270973502997; Sun, 11 Apr 2010 01:11:42 -0700 (PDT) Message-ID: From: Lin Jui-Nan Eric To: stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Different behavior of make(1) between command line argument and .MAKEFLAGS special target X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 08:40:00 -0000 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