bugmake - Bugs: bug #62936, Confusing description of chained...

 
 

bug #62936: Confusing description of chained rules in the manual

Submitter:  None
Submitted:  Mon 22 Aug 2022 09:05:20 AM UTC
   
 
Severity:  3 - Normal Item Group:  Documentation
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.3 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 01 Jan 2023 11:22:51 PM UTC, comment #2: 

I reread this paragraph and I still don't see anything particularly wrong or confusing about it.  No further information was provided so I'm closing this issue.  More comments can be added even when the issue is closed: if needed and I can re-open it.

Paul D. Smith <psmith>
Group administrator
Sat 15 Oct 2022 10:57:35 PM UTC, comment #1: 

I don't know why you say "you cannot update a non-existing file": make does this all the time!  When you start make in a clean directory there are no object files, for example, and so those files are non-existing but yet of course make will still update them.

By "update" the make manual means "run the recipe for that target".  It doesn't mean "modify an existing file or fail if the file doesn't already exist".  This term is used everywhere in the manual, to mean that same thing.

I guess I don't understand the issue well enough to suggest a better formulation either.  Maybe if you can say what "case" you mean when you say "how Make deals with this case" then it would become more clear where we might enhance the document to be less confusing.

As for "leave well enough alone" that's a very common idiom; for example: https://dictionary.cambridge.org/us/dictionary/english/leave-well-enough-alone

Paul D. Smith <psmith>
Group administrator
Mon 22 Aug 2022 09:05:20 AM UTC, original submission:  

Trying to understand a bug in my Makefile, I consulted the manual section on chained rules (https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html#Chained-Rules) and found the following paragraph, which is more confusing than helpful:

> The first difference is what happens if the intermediate file
> does not exist. If an ordinary file b does not exist, and make
> considers a target that depends on b, it invariably creates b
> and then updates the target from b. But if b is an intermediate
> file, then make can leave well enough alone. It won’t bother
> updating b, or the ultimate target, unless some prerequisite
> of b is newer than that target or there is some other reason
> to update that target.


The whole paragraph is about the case of an intermediate file that does not exist. But then there are references to updating the file - you cannot update a non-existing file! Also, "make can leave well enough alone" sounds more like the description of a person having a bad day than of a deterministically running computer program.

Unfortunately, I cannot propose a better formulation because I don't know how Make deals with this case - I really need the manual to help me out!

Cheers,
  Konrad.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-01 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code