bugmake - Bugs: bug #63417, .NOTINTERMEDIATE with no...

 
 

bug #63417: .NOTINTERMEDIATE with no prerequisites is not working

Submitter:  Masahiro Yamada <masahiroy>
Submitted:  Fri 25 Nov 2022 09:16:11 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.4 Operating System:  None
Fixed Release:  4.4.1 Triage Status:  Medium Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Nov 2022 10:22:08 PM UTC, comment #3: 

Pushed, thanks Dmitry!

Paul D. Smith <psmith>
Group administrator
Sun 27 Nov 2022 05:21:35 AM UTC, comment #2: 

Thanks, the patch worked for me.

Masahiro Yamada <masahiroy>
Sat 26 Nov 2022 02:35:35 AM UTC, comment #1: 

Thank you for your report.

At makefile parse time make processes .NOTINTERMEDIATE and marks all files as notintermediate. The issue with this example, is that at that time make does not yet have a notion of x.b. x.b appears later at build time, when make performs implicit search to find a rule to build x.a.
We had a test, but the test was broken.
A fix is in the attachment.


(file #54021, file #54022)

Dmitry Goncharov <dgoncharov>
Fri 25 Nov 2022 09:16:11 PM UTC, original submission:  

The manual says: ".NOTINTERMEDIATE with no prerequisites causes all targets to be treated as not intermediate."

I tested this on GMU Make 4.4, but it does not work as claimed.


[Test code]
%.a: %.b
        cp $< $@

%.b: %.c
        cp $< $@

.NOTINTERMEDIATE:


[Result]
$ touch x.c
$ make x.a
cp x.c x.b
cp x.b x.a
rm x.b



x.b was removed (as the effect of the chained rule).


BTW, ".NOTINTERMEDIATE: %.b" correctly suppresses the removal of x.b

Masahiro Yamada <masahiroy>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54021:  sv63417_fix.diff added by dgoncharov (4KiB - text/x-patch)
file #54022:  sv63417_test.diff added by dgoncharov (1KiB - text/x-patch)

 

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)
  • -email is unavailable- added by dgoncharov (Updated the item)
  • -email is unavailable- added by masahiroy (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-28 psmith StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4.1
        Triage StatusNone Medium Effort
    2022-11-26 dgoncharov Attached File- Added sv63417_fix.diff, #54021
        Attached File- Added sv63417_test.diff, #54022

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code