bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64886] order-only prerequisite on a .PHONY line makes prerequisite


From: Greg Minshall
Subject: [bug #64886] order-only prerequisite on a .PHONY line makes prerequisite "unmakeable"
Date: Sun, 12 Nov 2023 12:13:18 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?64886>

                 Summary: order-only prerequisite on a .PHONY line makes
prerequisite "unmakeable"
                   Group: make
               Submitter: minshall
               Submitted: Sun 12 Nov 2023 05:13:16 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.4.1
        Operating System: None
           Fixed Release: None
           Triage Status: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 12 Nov 2023 05:13:16 PM UTC By: Greg Minshall <minshall>
a buggy makefile can lead to odd behavior (surprise, surprise).

in this case, a target defined (erroneously) as an "order-only" prerequisite
on a .PHONY line, seems to prevent make from ever wanting to create that
target.

given this as a makefile (and, an empty `file.el`, but no `file.elc`):

%.elc: %.el
        ${EMACS} -f batch-byte-compile $<

.PHONY: all | file.elc
all:
        echo all


then


% make file.elc
make: Nothing to be done for 'file.elc'.


(again, `file.elc` does not exist.)  

apologies if this isn't a bug.

if there's no reason to allow order-only prerequisites on a `.PHONY` line,
maybe this construction should cause make to emit an error message?

cheers.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64886>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]