From nobody Sat Apr 1 17:45:28 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ppl1N2Vx6z435lc for ; Sat, 1 Apr 2023 17:45:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ppl1N0F7zz43h9 for ; Sat, 1 Apr 2023 17:45:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680371128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i/56gaZBXKIdyr/pYnjv+/4J8n63xaYKdqttn2k3pDc=; b=u6ayYvuW0zzGv3t5Dxoujarkkn8ViH1FoQWQiI3+nbSmi2tqO/W3ZwHwqcP5WZrxCHJzuG mxPdZZAqaP1vnQH84U15J89Vn+NPqGlm2tf07/jtnq5Smhpvqtxw4Rj/Lq1PYnK0nzrQoL MIs3dBdYrImcdyZXj2OhWVvYUsocQRvgCYgEjWfPHCh/neP2COMMtxcITUyOUzCwOScKGl AHOB8zVH2v0aEgtzvwXGgnrL8Zp+MdP9CXMZOghLIzJY3pxO1Z/CZQ/SSULMvpx5QhP6hq xqOcshr4iGKIX5+ORip9gpKxc/4Wlk8KIOcLhHbmu5/XcYzaB10ScBPQ2jEJhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680371128; a=rsa-sha256; cv=none; b=F3TDkj2vGQRUNwSWX5MVB6lJ8qoGOITm+DyuZLBSZoscqfO4A9PFbTpcC5DcNbS3io3uX+ Tp5nr0PRD5Q76lpoatWFfL/WJ75sVFoi1GYM9dETvbPFSXxMhrjlWrpyu/NTtNW9SJU+sZ JqY+T8lPr2vdqBNVMs8wAvBqARc3KvyYcH2BwBxUO47MpC7iUrg4vU38K9ibykN8CHfmMF bFgddV2Rp+8Rt4eMbwQrq8bjga8H8dNetnk98H/G+Nu/x87S7B1adDRxzaIldOTMMwgSOb oMmVqe3GkVFdWZkROWsJs3zVa+zvJV1FKiX1bYabQYyTWaGvPBjc7pM8Ik8D2A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ppl1M6Q5PzlPL for ; Sat, 1 Apr 2023 17:45:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 331HjRje068776 for ; Sat, 1 Apr 2023 17:45:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 331HjREm068775 for bugs@FreeBSD.org; Sat, 1 Apr 2023 17:45:27 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270584] make -q exits 1 when there's no work to do Date: Sat, 01 Apr 2023 17:45:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kreuter@progn.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270584 Bug ID: 270584 Summary: make -q exits 1 when there's no work to do Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: kreuter@progn.net "/usr/bin/make -q" on 13.1-RELEASE-p7 exits with status 1 when there's no w= ork to do for an explicitly specified target file. This both contradicts the man page, "Do not execute any commands, but exit 0 if the specified targets are up-to-date and 1, otherwise", and is apparently incompatible with SUSv4's m= ake specfication at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html Here's a pared-down reproduction: given this Makefile, -- foo: touch foo bar: foo sleep 1 touch bar -- Here is a commented transcript: # Ensure foo and bar do not exist $ rm foo bar $ /usr/bin/make -q bar $ echo $? 1 # The preceding 1 agrees with the man page and SUSv4. # Now let's create stuff. $ /usr/bin/make bar touch foo sleep 1 touch bar $ /usr/bin/make -q bar $ echo $? 1 # That 1 is disagrees with the manual and POSIX. # There's no work to do, so it should be 0. By inspection, both GNU make 4.4 and the "BSD make" available in MacPorts on OSX exit 0 in the last case.=20 N.B., ISTM that both the man page and SUSv4 don't fully specify what "make = -q" should do in all cases: the man page might be understood to only apply when there are "specified targets"; and SUSv4 might be understood to apply only = when a target is a file. In the example above, "bar" is both a specified target = and a file, so I think that this example is in the intersection of the manual a= nd=20 the standard. However, if anybody undertakes changing make, I'd request that -q cause mak= e to exit with status 0 whenever there's no work to do for all targets make is considering, whether those targets are specified or implied, and whether they're files or not. That behavior would, IMO, seem to be the most useful = for what it seems '-q' is for: asking make to determine whether there's any wor= k to do, irrespective of the nature of the target and how make's caller invoked = it. Here's system info, in case it's helpful for the bug report. I've got no lo= cal patches or anything on this host: $ uname -a uname -a FreeBSD ruk 13.1-RELEASE-p6 FreeBSD 13.1-RELEASE-p6 GENERIC amd64 $ freebsd-version -u freebsd-version -u 13.1-RELEASE-p7 Please let me know if further information would be useful for this report. --=20 You are receiving this mail because: You are the assignee for the bug.=