bin/144388: different behavior of make(1) between command line
argument and .MAKEFLAGS special target
Jui-Nan Lin
jnlin at csie.nctu.edu.tw
Mon Mar 1 14:10:03 UTC 2010
The following reply was made to PR bin/144388; it has been noted by GNATS.
From: Jui-Nan Lin <jnlin at csie.nctu.edu.tw>
To: bug-followup at FreeBSD.org, yanefbsd at gmail.com
Cc:
Subject: Re: bin/144388: different behavior of make(1) between command line
argument and .MAKEFLAGS special target
Date: Mon, 1 Mar 2010 21:36:56 +0800
Hi Garrett,
Following is the result:
# cat Makefile
.MAKEFLAGS: -j1
all:
/bin/sleep 10 & \
/bin/sleep 10 &
@wait
# time make all
/bin/sleep 10 & /bin/sleep 10 &
0.000u 0.006s 0:00.01 0.0% 0+0k 0+0io 0pf+0w
# time make -j1 all
/bin/sleep 10 & /bin/sleep 10 &
0.000u 0.007s 0:10.00 0.0% 0+0k 0+0io 0pf+0w
The latter version is correct because when specifying "-j", make(1)
only forks a shell for all commands. If no "-j" specified, make forks
1 shell for each command. You can see manpage of make(1).
More information about the freebsd-bugs
mailing list