From nobody@FreeBSD.org  Fri Apr 29 23:19:49 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2EDF81065670
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 Apr 2011 23:19:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C3ED8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 Apr 2011 23:19:49 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3TNJmg0087052
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 Apr 2011 23:19:48 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p3TNJmGW087051;
	Fri, 29 Apr 2011 23:19:48 GMT
	(envelope-from nobody)
Message-Id: <201104292319.p3TNJmGW087051@red.freebsd.org>
Date: Fri, 29 Apr 2011 23:19:48 GMT
From: Arnaud Lacombe <lacombar@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make(1) do not respect.ORDER not in non-parallel mode
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156729
>Category:       bin
>Synopsis:       make(1) does not respect.ORDER in non-parallel mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 29 23:20:07 UTC 2011
>Closed-Date:    
>Last-Modified:  Sat Apr 30 02:10:11 UTC 2011
>Originator:     Arnaud Lacombe
>Release:        8.2-STABLE
>Organization:
n
>Environment:
>Description:
Considering the following `Makefile.test':

all: a b

a: .PHONY
        @echo after

b: .PHONY
        @echo before

.ORDER: b a

Triggers the following default behavior:

% make -f Makefile.test
after
before

While when the invoked with `-j', the .ORDER directive is respected.

% make -j 2 -f Makefile.test
before
after

Removing the .ORDER directive trigger the default behavior.

This could be fixed by making `a' depend on `b', but this may not be possible when dealing with dynamically generated rules.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Arnaud Lacombe <lacombar@gmail.com>
To: bug-followup@FreeBSD.org, lacombar@gmail.com
Cc:  
Subject: Re: bin/156729: make(1) do not respect.ORDER not in non-parallel mode
Date: Fri, 29 Apr 2011 19:27:24 -0400

 [If someone could edit the PR to remove the 'not' after .ORDER in the
 title, that's a typo. Thanks]

From: Arnaud Lacombe <lacombar@gmail.com>
To: bug-followup@freebsd.org, lacombar@gmail.com
Cc:  
Subject: Re: bin/156729: make(1) do not respect.ORDER not in non-parallel mode
Date: Fri, 29 Apr 2011 22:05:23 -0400

 Disabling compat-mode fixes the issue, as applying the following patch:
 
 diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
 index daeada4..b6074e6 100644
 --- a/usr.bin/make/main.c
 +++ b/usr.bin/make/main.c
 @@ -1081,12 +1081,6 @@ main(int argc, char **argv)
 
         if (getenv("MAKE_JOBS_FIFO") != NULL)
                 forceJobs = TRUE;
 -       /*
 -        * Be compatible if user did not specify -j and did not explicitly
 -        * turned compatibility on
 -        */
 -       if (!compatMake && !forceJobs)
 -               compatMake = TRUE;
 
         /*
          * Initialize target and suffix modules in preparation for
 
 leads to the expected behavior of .ORDER.
 
  - Arnaud
 
 On Fri, Apr 29, 2011 at 7:27 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
 > [If someone could edit the PR to remove the 'not' after .ORDER in the
 > title, that's a typo. Thanks]
 >
>Unformatted:
